diff --git a/src/commands.py b/src/commands.py index eee35c6c2..ef7a61466 100644 --- a/src/commands.py +++ b/src/commands.py @@ -280,7 +280,10 @@ def getBanmask(irc, msg, args, state): getChannel(irc, msg, args, state) channel = state.channel banmaskstyle = conf.supybot.protocols.irc.banmask - state.args[-1] = banmaskstyle.makeBanmask(state.args[-1]) + try: + state.args[-1] = banmaskstyle.makeBanmask(state.args[-1]) + except AssertionError: + state.errorInvalid('channel', channel) def getUser(irc, msg, args, state): try: