From ee5a605a6e81174284d6c96662b5946779afbb5f Mon Sep 17 00:00:00 2001 From: Robin H. Johnson Date: Sun, 7 Mar 2010 03:22:04 +0000 Subject: [PATCH] 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 --- lib/rbot/rfc2812.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/rbot/rfc2812.rb b/lib/rbot/rfc2812.rb index bbc91bd..fb70619 100644 --- a/lib/rbot/rfc2812.rb +++ b/lib/rbot/rfc2812.rb @@ -1331,7 +1331,7 @@ def process(serverstring) 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}]/) -- 1.6.6.1