Reply with an error when getBanmask doesn't have a valid channel.

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This commit is contained in:
James Vega 2009-09-02 07:40:33 -04:00
parent 260570bd4f
commit 459bc616b1

View File

@ -280,7 +280,10 @@ def getBanmask(irc, msg, args, state):
getChannel(irc, msg, args, state) getChannel(irc, msg, args, state)
channel = state.channel channel = state.channel
banmaskstyle = conf.supybot.protocols.irc.banmask banmaskstyle = conf.supybot.protocols.irc.banmask
try:
state.args[-1] = banmaskstyle.makeBanmask(state.args[-1]) state.args[-1] = banmaskstyle.makeBanmask(state.args[-1])
except AssertionError:
state.errorInvalid('channel', channel)
def getUser(irc, msg, args, state): def getUser(irc, msg, args, state):
try: try: