From a8a6c431cb8d2ea48eda8114496f8748a4519e15 Mon Sep 17 00:00:00 2001 From: acidvegas Date: Sun, 18 Jun 2023 17:56:47 -0400 Subject: [PATCH] Fixed error when being forced joined into channels on connect --- ircp.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ircp.py b/ircp.py index 36a6275..1f04f30 100644 --- a/ircp.py +++ b/ircp.py @@ -360,8 +360,9 @@ class probe: elif event == '366' and len(args) >= 4: # RPL_ENDOFNAMES chan = args[3] self.channels['current'].append(chan) - debug('{0}\033[32mJOIN\033[0m {1} \033[30m(found \033[93m{2}\033[0m users)\033[0m'.format(self.display, chan, self.channels['users'][chan])) - del self.channels['users'][chan] + if chan in self.channels['users']: + debug('{0}\033[32mJOIN\033[0m {1} \033[30m(found \033[93m{2}\033[0m users)\033[0m'.format(self.display, chan, self.channels['users'][chan])) + del self.channels['users'][chan] await self.raw('WHO ' + chan) await self.raw(f'MODE {chan} +b') await asyncio.sleep(1)