diff options
| author | 2019-06-08 10:59:14 +0100 | |
|---|---|---|
| committer | 2019-06-08 10:59:52 +0100 | |
| commit | d4ba98307f98a083fba7c67738b445c21141ebd2 (patch) | |
| tree | 144ab03a87bba69a83099b0144b954c29e6afdcc /modules/line_handler | |
| parent | Only request a CAP once. closes #66 (diff) | |
| signature | ||
We should look at ISUPPORT's STATUSMSG token instead of PREFIX
Diffstat (limited to 'modules/line_handler')
| -rw-r--r-- | modules/line_handler/core.py | 2 | ||||
| -rw-r--r-- | modules/line_handler/message.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/modules/line_handler/core.py b/modules/line_handler/core.py index 06f95f0e..b85a9677 100644 --- a/modules/line_handler/core.py +++ b/modules/line_handler/core.py @@ -53,6 +53,8 @@ def handle_005(events, event): event["server"].channel_types = list(isupport["CHANTYPES"]) if "CASEMAPPING" in isupport: event["server"].case_mapping = isupport["CASEMAPPING"] + if "STATUSMSG" in isupport: + event["server"].statusmsg = list(isupport["STATUSMSG"]) events.on("received.005").call(isupport=isupport, server=event["server"]) diff --git a/modules/line_handler/message.py b/modules/line_handler/message.py index 9157af66..467d7682 100644 --- a/modules/line_handler/message.py +++ b/modules/line_handler/message.py @@ -46,7 +46,7 @@ def message(events, event): # 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_str.lstrip("".join(event["server"].prefix_symbols.keys())) + target = target_str.lstrip("".join(event["server"].statusmsg)) is_channel = False |
