aboutsummaryrefslogtreecommitdiff
path: root/modules/line_handler.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-01-27 22:38:19 +0000
committerGravatar jesopo2019-01-27 22:38:19 +0000
commit1301e8062160890c0eb328181c0ef7f4184f2cbe (patch)
tree3061a9adb1dbd63393fdb13573846cefc5f98285 /modules/line_handler.py
parentThe 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.py5
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])