Only allow 'current channel' !config logic when we're in a channel

This commit is contained in:
jesopo 2019-04-15 16:48:04 +01:00
parent f60deba6c7
commit 210125d90b

View file

@ -285,7 +285,12 @@ class Module(ModuleManager.BaseModule):
target = ConfigChannelTarget(self.bot, event["server"],
name)
else:
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"]