From 91b09e270da513d8cb2ec6f63f029bd32a4998ea Mon Sep 17 00:00:00 2001 From: Dpeta Date: Sun, 5 Jun 2022 02:43:08 +0200 Subject: [PATCH] added extra timeout to wait for server RPL_ISUPPORT --- irc.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/irc.py b/irc.py index e3f0d38..9c1e10c 100644 --- a/irc.py +++ b/irc.py @@ -735,8 +735,13 @@ class PesterHandler(DefaultCommandHandler): # If it fails the old code is excecuted. # Wait for server to send welcome to verify RPL_ISUPPORT has been send. - while self.parent.registeredIRC == False: + # Apparently 005 is send after 001 so nvm we gotta wait longer :"3 + timeout = 0 + while ((self.parent.registeredIRC == False) + or ((timeout < 15) + and (self.parent.metadata_supported == False))): time.sleep(0.1) + timeout += 1 # Get via metadata or via legacy method if self.parent.metadata_supported == True: @@ -750,6 +755,7 @@ class PesterHandler(DefaultCommandHandler): self.parent.setConnectionBroken() else: # Legacy + PchumLog.warning("Server doesn't seem to support metadata, using legacy GETMOOD.") chumglub = "GETMOOD " for c in chums: chandle = c.handle