Check that channels are valid before trying to join them.

This commit is contained in:
Jeremy Fincher 2004-01-19 22:20:48 +00:00
parent 9c0b26ebb0
commit 0081c27812
1 changed files with 3 additions and 0 deletions

View File

@ -134,6 +134,9 @@ class Admin(privmsgs.CapabilityCheckingPrivmsg):
keys.insert(0, key)
else:
channels.append(channel)
if not ircutils.isChannel(channel):
irc.error('%r is not a valid channel.' % channel)
return
irc.queueMsg(ircmsgs.joins(channels, keys))
for channel in channels:
self.joins[channel] = (irc, msg)