mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-04 18:29:21 +01:00
Added conf.requireChannelCommandsToBeSentInChannel.
This commit is contained in:
parent
8895ffdc1c
commit
26995a7017
@ -55,6 +55,11 @@ def getChannel(msg, args):
|
|||||||
removed).
|
removed).
|
||||||
"""
|
"""
|
||||||
if args and ircutils.isChannel(args[0]):
|
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)
|
return args.pop(0)
|
||||||
elif ircutils.isChannel(msg.args[0]):
|
elif ircutils.isChannel(msg.args[0]):
|
||||||
return msg.args[0]
|
return msg.args[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user