From 009cac226342d9a73e82332231ea17e5b013e4c4 Mon Sep 17 00:00:00 2001 From: James Lu Date: Thu, 8 Oct 2015 20:44:12 -0700 Subject: [PATCH] unreal: fix joinClient not adding users to state (#104) --- protocols/unreal.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/protocols/unreal.py b/protocols/unreal.py index 9026097..14fbffb 100644 --- a/protocols/unreal.py +++ b/protocols/unreal.py @@ -264,7 +264,7 @@ class UnrealProtocol(TS6BaseProtocol): handle_notice = handle_privmsg def handle_join(self, numeric, command, args): - # <- GL JOIN #pylink,#test + # <- :GL JOIN #pylink,#test for channel in args[0].split(','): c = self.irc.channels[channel] if args[0] == '0': @@ -276,9 +276,12 @@ class UnrealProtocol(TS6BaseProtocol): self.irc.channels[ch].users.discard(numeric) self.irc.users[numeric].channels.discard(ch) return {'channels': oldchans, 'text': 'Left all channels.', 'parse_as': 'PART'} + + self.irc.users[numeric].channels.add(channel) + self.irc.channels[channel].users.add(numeric) # Call hooks manually, because one JOIN command in UnrealIRCd can # have multiple channels... self.irc.callHooks([numeric, command, {'channel': channel, 'users': [numeric], 'modes': - c.modes, 'ts': c.ts}]) + c.modes, 'ts': c.ts}]) Class = UnrealProtocol