From 689ecb0b82876da687677b310d4c7dfe7886757d Mon Sep 17 00:00:00 2001 From: encrypt Date: Wed, 20 Jan 2016 16:23:41 +0100 Subject: [PATCH] first commit --- tubiabot.rb | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 tubiabot.rb diff --git a/tubiabot.rb b/tubiabot.rb new file mode 100644 index 0000000..56306c5 --- /dev/null +++ b/tubiabot.rb @@ -0,0 +1,38 @@ +# coding: utf-8 +require 'cinch' + +class ToniNegri + include Cinch::Plugin + + match "toninegri" + + def execute(m) + @bot.nick = "toninegri" + m.reply "swasp: sono tuo padre" + @bot.nick = "TubiaBot" + end +end + +class Caffe + include Cinch::Plugin + + match "caffè" + + def execute(m) + users = [ "qup", "imega", "gresci" ] + requests = [ "andiamo al bar?", "caffè?", "bar?" ] + m.reply users.sample+": "+requests.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] + end +end + +bot.start