aboutsummaryrefslogtreecommitdiff
path: root/modules/line_handler/channel.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-05-09 11:55:35 +0100
committerGravatar jesopo2019-05-09 11:55:35 +0100
commit5dd019d79f587cce5de0ff5fae94faaa39f5a34d (patch)
treea8348c8a69c51e75bcbe974752eaff0184bc8d43 /modules/line_handler/channel.py
parentOnly split NAMES reply at literal space, .split() is overzealous (diff)
signature
Handle dangling spaces at the end of a NAMES response
Diffstat (limited to 'modules/line_handler/channel.py')
-rw-r--r--modules/line_handler/channel.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/line_handler/channel.py b/modules/line_handler/channel.py
index 6976fcc1..0f0858c6 100644
--- a/modules/line_handler/channel.py
+++ b/modules/line_handler/channel.py
@@ -30,6 +30,11 @@ def handle_333(events, event):
def handle_353(event):
channel = event["server"].channels.get(event["args"][2])
nicknames = event["args"].get(3).split(" ")
+
+ # there can sometimes be a dangling space at the end of a 353
+ if nicknames and not nicknames[-1]:
+ nicknames.pop(-1)
+
for nickname in nicknames:
modes = set([])