Let's make sure we don't try to join if we're getting too close to the max

number of channels we can be in. Also, irc.noReply so that things like Infobot
aren't triggered.
This commit is contained in:
James Vega 2004-09-23 16:28:29 +00:00
parent 6e1dc647dd
commit 2e0a91c3c7

View File

@ -163,8 +163,9 @@ class Admin(privmsgs.CapabilityCheckingPrivmsg):
maxchannels = irc.state.supported.get('maxchannels', sys.maxint)
if len(irc.state.channels) + len(channels) > maxchannels:
irc.error('I\'m already too close to maximum number of '
'channels for this network.')
'channels for this network.', Raise=True)
irc.queueMsg(ircmsgs.joins(channels, keys))
irc.noReply()
for channel in channels:
self.joins[channel] = (irc, msg)