From 8adbf86efb3f699b3544e52aa381dde55cb0a527 Mon Sep 17 00:00:00 2001 From: encrypt Date: Fri, 22 Jan 2016 10:02:55 +0100 Subject: [PATCH] add js plugin --- tubiabot.rb | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tubiabot.rb b/tubiabot.rb index 2087083..72ca960 100644 --- a/tubiabot.rb +++ b/tubiabot.rb @@ -31,19 +31,30 @@ class Amici match /lavor(o|are|atori)/ def execute(m) - users = [ "qup", "imega", "gresci","jigen","lgine","encrypt" ] + users = [ "qup", "imega", "gresci", "jigen", "lgine", "encrypt", "thegamer" ] requests = [ "oggi non ho voglia di fare un cazzo", "caffè?", "andiamo al bar?" ] m.reply users.sample+" "+users.sample+" "+requests.sample end end +class JS + include Cinch::Plugin + + match /js/ + + def execute(m) + frameworks = ["Angular", "React", "Ember", "Meteor"] + loves = ["è una figata", "è bellissimo"] + m.reply frameworks.sample+" "+loves.sample + end +end bot = Cinch::Bot.new do configure do |c| c.server = "irc.mufhd0.net" c.nick = "TubiaBot" c.channels = ["#indivia"] - c.plugins.plugins = [Caffe, ToniNegri,Amici] + c.plugins.plugins = [Caffe, ToniNegri, Amici, JS] end end