aboutsummaryrefslogtreecommitdiff
path: root/modules/line_handler.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-02-04 21:32:44 +0000
committerGravatar jesopo2019-02-04 21:32:44 +0000
commitac16887c4819f9378d28922b825f1e492cdb7ea8 (patch)
tree53fc31c0947a4f162988760e669fc349cfe32bc4 /modules/line_handler.py
parentTry to match against full repository name first, so that we can make specific (diff)
signature
Reply to statusmsg commands (e.g. '/msg +channel !ping') with the same statusmsg
Diffstat (limited to 'modules/line_handler.py')
-rw-r--r--modules/line_handler.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/line_handler.py b/modules/line_handler.py
index da41a463..76d78bf7 100644
--- a/modules/line_handler.py
+++ b/modules/line_handler.py
@@ -413,8 +413,10 @@ class Module(ModuleManager.BaseModule):
# 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
- prefix_symbols = "".join(event["server"].prefix_symbols.keys())
- target = target.lstrip(prefix_symbols)
+ statusmsg = []
+ while target[0] in event["server"].prefix_symbols.keys():
+ statusmsg.append(target[0])
+ target = target[1:]
channel = None
if target[0] in event["server"].channel_types:
@@ -445,7 +447,7 @@ class Module(ModuleManager.BaseModule):
if channel:
self._event(event, "message.channel", user=user, channel=channel,
- **kwargs)
+ statusmsg=statusmsg, **kwargs)
channel.buffer.add_message(user_nickname, message, action,
event["tags"], user==None)
elif event["server"].is_own_nickname(target):