diff --git a/tubiabot.rb b/tubiabot.rb index 72ca960..fc881b2 100644 --- a/tubiabot.rb +++ b/tubiabot.rb @@ -49,12 +49,30 @@ class JS end end +class Salvino + include Cinch::Plugin + + match /salvino/ + + def execute(m) + m.reply "FORZA SALVINO"+("O"*rand(3...10)) + 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, JS] + c.plugins.plugins = [Caffe, ToniNegri, Amici, JS, Salvino] + end +end + +logger = File.open("./logs.txt", 'a+') + +bot.on :message do |m| + if m.user.nick == "Tubia87" + logger.write(m.message+"\n") end end