summaryrefslogtreecommitdiff
path: root/lib/rbot/ircbot.rb
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-06-28 22:21:17 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-06-28 22:21:17 +0000
commitff9fdc310b8bc248422a45a9c6e4c9bbd6c1d02f (patch)
tree7c9f506ca66419deb18b2c4329e12f9cb474a724 /lib/rbot/ircbot.rb
parent1df6e0187b130b4b957aa38359ac366c02cba47f (diff)
Be more tolerant for messages about channels we are not in, but still signal them as bugs
Diffstat (limited to 'lib/rbot/ircbot.rb')
-rw-r--r--lib/rbot/ircbot.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb
index e88929fe..76820bc9 100644
--- a/lib/rbot/ircbot.rb
+++ b/lib/rbot/ircbot.rb
@@ -296,7 +296,7 @@ class IrcBot
users = data[:users]
unless(@channels[channel])
puts "bug: got names for channel '#{channel}' I didn't think I was in\n"
- exit 2
+ # exit 2
end
@channels[channel].users.clear
users.each {|u|
@@ -839,7 +839,12 @@ class IrcBot
@channels.delete(m.channel)
else
log "@ #{m.sourcenick} left channel #{m.channel} (#{m.message})", m.channel
- @channels[m.channel].users.delete(m.sourcenick)
+ if @channels.has_key?(m.channel)
+ @channels[m.channel].users.delete(m.sourcenick)
+ else
+ puts "bug: got part for channel '#{channel}' I didn't think I was in\n"
+ # exit 2
+ end
end
# delegate to plugins