Only allow 'current channel' !config logic when we're in a channel
This commit is contained in:
parent
f60deba6c7
commit
210125d90b
1 changed files with 6 additions and 1 deletions
|
@ -285,7 +285,12 @@ class Module(ModuleManager.BaseModule):
|
|||
target = ConfigChannelTarget(self.bot, event["server"],
|
||||
name)
|
||||
else:
|
||||
target = event["target"]
|
||||
if event["is_channel"]:
|
||||
target = event["target"]
|
||||
else:
|
||||
raise utils.EventError(
|
||||
"Cannot change config for current channel when in "
|
||||
"private message")
|
||||
elif context == "server":
|
||||
setting_key = "serverset"
|
||||
target = event["server"]
|
||||
|
|
Loading…
Reference in a new issue