add js plugin

This commit is contained in:
encrypt 2016-01-22 10:02:55 +01:00
parent 4e8adf41f5
commit 8adbf86efb

View file

@ -31,19 +31,30 @@ class Amici
match /lavor(o|are|atori)/ match /lavor(o|are|atori)/
def execute(m) 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?" ] requests = [ "oggi non ho voglia di fare un cazzo", "caffè?", "andiamo al bar?" ]
m.reply users.sample+" "+users.sample+" "+requests.sample m.reply users.sample+" "+users.sample+" "+requests.sample
end end
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 bot = Cinch::Bot.new do
configure do |c| configure do |c|
c.server = "irc.mufhd0.net" c.server = "irc.mufhd0.net"
c.nick = "TubiaBot" c.nick = "TubiaBot"
c.channels = ["#indivia"] c.channels = ["#indivia"]
c.plugins.plugins = [Caffe, ToniNegri,Amici] c.plugins.plugins = [Caffe, ToniNegri, Amici, JS]
end end
end end