From 1301e8062160890c0eb328181c0ef7f4184f2cbe Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 27 Jan 2019 22:38:19 +0000 Subject: [PATCH] Strip `prefix_symbols` from PRIVMSG target, for e.g. 'PRIVMSG +#chan :hi' (line_handler.py) --- modules/line_handler.py | 5 +++++ 1 file changed, 5 insertions(+) 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])