Report abuse
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
IRCEvent.add_callback('privmsg') do |event|
unless event.channel == bot.nick
if event.message =~ /^!(.+)/
line = $1.split
if $commands[line.first].nil?
bot.send_message(event.channel, "What?!?")
else
$commands[line.shift][1].call(event, line.join(' '))
end
end
else
end
end
|