Fix register_trigger calls.
parent
fa8ee9d02e
commit
9ff54e0a06
|
@ -39,7 +39,7 @@ end
|
|||
|
||||
Client.load_commands
|
||||
|
||||
Client.register_trigger("PRIVMSG") { |msg|
|
||||
Client.register_trigger("PRIVMSG", "commands") { |msg|
|
||||
# who sent the message
|
||||
src_nick = msg[:prefix].split('!').first
|
||||
# what was it
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
include EventMachine::IRC::Commands
|
||||
|
||||
Client.register_trigger("PRIVMSG") { |msg|
|
||||
Client.register_trigger("PRIVMSG", "mikrofalowka") { |msg|
|
||||
nick = msg[:prefix].split('!').first
|
||||
destination = msg[:params][0]
|
||||
Client.privmsg(destination, "#{nick}: napraw mikrofalowke") if nick.match /[Bb].[Rr][Tt]/
|
||||
Client.privmsg(destination, "#{nick}: napraw mikrofalowke") if nick.match(/[Bb].[Rr][Tt]/)
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
include EventMachine::IRC::Commands
|
||||
|
||||
Client.register_trigger("PRIVMSG") { |msg|
|
||||
p msg
|
||||
Client.register_trigger("PRIVMSG", "pretty_print") { |msg|
|
||||
pp msg
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ end
|
|||
|
||||
DataMapper.auto_upgrade!
|
||||
|
||||
Client.register_trigger("PRIVMSG") do |msg|
|
||||
Client.register_trigger("PRIVMSG", "scrape") do |msg|
|
||||
titles = []
|
||||
return 0 if msg[:params][1].nil?
|
||||
msg[:params][1].split.each do |word|
|
||||
|
|
Loading…
Reference in New Issue