From 691c2d2c115278b43dd7e99523c114fb57c13fae Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Tue, 5 Mar 2019 15:22:41 +0100 Subject: irc: Fix NAMES reply handling User list may be send using multiple reply messages if too long. Do not overwrite the previous one. --- crocoite/irc.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crocoite/irc.py b/crocoite/irc.py index 1f06158..0303675 100644 --- a/crocoite/irc.py +++ b/crocoite/irc.py @@ -258,7 +258,12 @@ class ArgparseBot (bottom.Client): # no need for NAMES here, server sends this automatically async def onNameReply (self, target, channel_type, channel, users, **kwargs): - self.users[channel] = dict (map (lambda x: (x.name, x), map (User.fromName, users))) + # channels may be too big for a single message + addusers = dict (map (lambda x: (x.name, x), map (User.fromName, users))) + if channel not in self.users: + self.users[channel] = addusers + else: + self.users[channel].update (addusers) @staticmethod def parseMode (mode): -- cgit v1.2.3