diff options
| author | 2019-09-17 10:25:42 +0100 | |
|---|---|---|
| committer | 2019-09-17 10:25:42 +0100 | |
| commit | c8133e7847412cea642ca360afa8b1e377c6c78c (patch) | |
| tree | c37b939e4fba1cc919cb60d50f0d57b0043034e9 /modules/config.py | |
| parent | permit '!config #channel <setting>' and '!config own_nick <setting>' (diff) | |
| signature | ||
treat config target "*" as current channel or current user in PM
Diffstat (limited to 'modules/config.py')
| -rw-r--r-- | modules/config.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/config.py b/modules/config.py index d87ae302..fa175634 100644 --- a/modules/config.py +++ b/modules/config.py @@ -46,6 +46,13 @@ class Module(ModuleManager.BaseModule): def _to_context(self, server, channel, user, context_desc): context_desc_lower = context_desc.lower() + if context_desc == "*": + if channel == user: + # we're in PM + return user, "set" + else: + #we're in a channel + return channel, "channelset" if context_desc_lower[0] in server.channel_types: return context_desc, "channelset" elif server.irc_lower(context_desc) == user.nickname_lower: |
