From 5dd019d79f587cce5de0ff5fae94faaa39f5a34d Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 9 May 2019 11:55:35 +0100 Subject: Handle dangling spaces at the end of a NAMES response --- modules/line_handler/channel.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules') 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([]) -- cgit v1.3.1-10-gc9f91