forked from encrypt/TubiaBot
first commit
This commit is contained in:
commit
689ecb0b82
1 changed files with 38 additions and 0 deletions
38
tubiabot.rb
Normal file
38
tubiabot.rb
Normal file
|
@ -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
|
Loading…
Reference in a new issue