TubiaBot/tubiabot.rb
2016-01-22 10:02:55 +01:00

61 líneas
1,2 KiB
Ruby

# 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(è|e)/
def execute(m)
users = [ "qup", "imega", "gresci" ]
requests = [ "andiamo al bar?", "caffè?", "bar?" ]
m.reply users.sample+": "+requests.sample
end
end
class Amici
include Cinch::Plugin
match /lavor(o|are|atori)/
def execute(m)
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, JS]
end
end
bot.start