summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-03-14 00:14:34 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-03-14 00:14:34 +0000
commit484d8fc1200f14793fbe02aa1948feafccea73ef (patch)
treefe38550aed39eba28ec81fe7b59a7bd854664086 /lib
parenta6ac5d31a3c783eeb54b49ae04587f083eb8c6a1 (diff)
Improved handling of server limits
Diffstat (limited to 'lib')
-rw-r--r--lib/rbot/irc.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/rbot/irc.rb b/lib/rbot/irc.rb
index c2c1e82f..08ad5e69 100644
--- a/lib/rbot/irc.rb
+++ b/lib/rbot/irc.rb
@@ -1526,6 +1526,10 @@ module Irc
groups.each { |g|
k, v = g.split(':')
@supports[key][k] = v.to_i || 0
+ if @supports[key][k] == 0
+ warn "Deleting #{key} limit of 0 for #{k}"
+ @supports[key].delete(k)
+ end
}
}
when :chanmodes
@@ -1677,7 +1681,8 @@ module Irc
channel_names.each { |n|
count += 1 if k.include?(n[0])
}
- raise IndexError, "Already joined #{count} channels with prefix #{k}" if count == @supports[:chanlimit][k]
+ # raise IndexError, "Already joined #{count} channels with prefix #{k}" if count == @supports[:chanlimit][k]
+ warn "Already joined #{count}/#{@supports[:chanlimit][k]} channels with prefix #{k}, we may be going over server limits" if count >= @supports[:chanlimit][k]
}
# So far, everything is fine. Now create the actual Channel