Must've forgotten to commit this earlier.

This commit is contained in:
Jeremy Fincher 2003-04-11 21:10:17 +00:00
parent 9253ce5adc
commit e5c58089ce

View File

@ -50,11 +50,10 @@ def getChannel(msg, args):
If the channel was given in args, args is modified (the channel is If the channel was given in args, args is modified (the channel is
removed). removed).
""" """
if ircutils.isChannel(msg.args[0]): if args and ircutils.isChannel(args[0]):
return msg.args[0]
else:
if len(args) > 0:
return args.pop(0) return args.pop(0)
elif ircutils.isChannel(msg.args[0]):
return msg.args[0]
else: else:
raise callbacks.Error, 'Command must be sent in a channel or ' \ raise callbacks.Error, 'Command must be sent in a channel or ' \
'include a channel in its arguments.' 'include a channel in its arguments.'