Added conf.requireChannelCommandsToBeSentInChannel.

This commit is contained in:
Jeremy Fincher 2004-01-01 20:10:52 +00:00
parent 8895ffdc1c
commit 26995a7017

View File

@ -55,6 +55,11 @@ def getChannel(msg, args):
removed).
"""
if args and ircutils.isChannel(args[0]):
if conf.requireChannelCommandsToBeSentInChannel:
if args[0] != msg.args[0]:
s = 'Channel commands must be sent in the channel to which ' \
'they apply.'
raise callbacks.Error, s
return args.pop(0)
elif ircutils.isChannel(msg.args[0]):
return msg.args[0]