diff options
author | Alex Legler <a3li@gentoo.org> | 2009-11-27 13:35:36 +0100 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2009-12-21 11:05:30 +0100 |
commit | a1db6671fb3819b58bcc1f0494b86d3a32df747f (patch) | |
tree | e0dca8f4d670c744b210b62fc7c81c460b397ea2 /lib/rbot/rfc2812.rb | |
parent | 9b28df160e736561547440f985c35056d044276e (diff) |
ircbot/rfc2812/message: Add banlist message handling
Diffstat (limited to 'lib/rbot/rfc2812.rb')
-rw-r--r-- | lib/rbot/rfc2812.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/rbot/rfc2812.rb b/lib/rbot/rfc2812.rb index 0b7e0786..bbc91bdf 100644 --- a/lib/rbot/rfc2812.rb +++ b/lib/rbot/rfc2812.rb @@ -967,6 +967,9 @@ module Irc # This is used by some messages to build lists of users that # will be delegated when the ENDOF... message is received @tmpusers = [] + + # Same as above, just for bans + @tmpbans = [] end # Clear the server and reset the user @@ -1180,6 +1183,17 @@ module Irc data[:users] = @tmpusers handle(:names, data) @tmpusers = Array.new + when RPL_BANLIST + data[:channel] = @server.channel(argv[1]) + data[:mask] = argv[2] + data[:by] = argv[3] + data[:at] = argv[4] + @tmpbans << data + when RPL_ENDOFBANLIST + data[:channel] = @server.channel(argv[1]) + data[:bans] = @tmpbans + handle(:banlist, data) + @tmpbans = Array.new when RPL_LUSERCLIENT # ":There are <integer> users and <integer> # services on <integer> servers" |