summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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