diff options
| author | 2019-09-17 10:21:48 +0100 | |
|---|---|---|
| committer | 2019-09-17 10:21:48 +0100 | |
| commit | cf0a81d2e52409c78dcec166709c8e9f66e4a72a (patch) | |
| tree | 2cd4fdcc3bcc122eb78968de879d710778d42a8f | |
| parent | add missing IRCLine import to IRCChannel (diff) | |
| signature | ||
permit '!config #channel <setting>' and '!config own_nick <setting>'
| -rw-r--r-- | modules/config.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/config.py b/modules/config.py index ee5d193a..d87ae302 100644 --- a/modules/config.py +++ b/modules/config.py @@ -45,7 +45,12 @@ class ConfigChannelTarget(object): class Module(ModuleManager.BaseModule): def _to_context(self, server, channel, user, context_desc): context_desc_lower = context_desc.lower() - if "user".startswith(context_desc_lower): + + if context_desc_lower[0] in server.channel_types: + return context_desc, "channelset" + elif server.irc_lower(context_desc) == user.nickname_lower: + return user, "set" + elif "user".startswith(context_desc_lower): return user, "set" elif "channel".startswith(context_desc_lower): return channel, "channelset" |
