diff options
| author | 2019-01-27 22:38:19 +0000 | |
|---|---|---|
| committer | 2019-01-27 22:38:19 +0000 | |
| commit | 1301e8062160890c0eb328181c0ef7f4184f2cbe (patch) | |
| tree | 3061a9adb1dbd63393fdb13573846cefc5f98285 /modules/line_handler.py | |
| parent | The event fired when we get an `account-notify` message iss (diff) | |
| signature | ||
Strip `prefix_symbols` from PRIVMSG target, for e.g. 'PRIVMSG +#chan :hi'
(line_handler.py)
Diffstat (limited to 'modules/line_handler.py')
| -rw-r--r-- | modules/line_handler.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/line_handler.py b/modules/line_handler.py index e72af3fb..9c3adf6e 100644 --- a/modules/line_handler.py +++ b/modules/line_handler.py @@ -410,6 +410,11 @@ class Module(ModuleManager.BaseModule): message_split = message.split(" ") target = event["args"][0] + # strip prefix_symbols from the start of target, for when people use + # e.g. 'PRIVMSG +#channel :hi' which would send a message to only + # voiced-or-above users + target = target.lstrip(list(event["server"].prefix_symbols.keys())) + channel = None if target[0] in event["server"].channel_types: channel = event["server"].channels.get(event["args"][0]) |
