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

View File

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