summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2010-03-07 03:22:04 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2010-03-07 10:46:18 +0100
commit38c076622c020e509c8f1dca4e3168ea38f5999e (patch)
tree387fa8033a455fa8ed2da71c5cc42b8bec2fab82 /lib
parentf8acbf17ff67de70247671742b4bc4f321e71f17 (diff)
rfc2812: Fix multiple RPL_WHOISCHANNELS handling
The new Freenode ircd returns multiple RPL_WHOISCHANNELS lines (split based on length), and they must be merged, otherwise only the last ends up as the list of channels that the bot is in. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/rbot/rfc2812.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rbot/rfc2812.rb b/lib/rbot/rfc2812.rb
index bbc91bdf..fb70619c 100644
--- a/lib/rbot/rfc2812.rb
+++ b/lib/rbot/rfc2812.rb
@@ -1331,7 +1331,7 @@ module Irc
when RPL_WHOISCHANNELS
@whois ||= Hash.new
@whois[:nick] = argv[1]
- @whois[:channels] = []
+ @whois[:channels] ||= []
user = @server.user(@whois[:nick])
argv[-1].split.each do |prechan|
pfx = prechan.scan(/[#{@server.supports[:prefix][:prefixes].join}]/)