added extra timeout to wait for server RPL_ISUPPORT

This commit is contained in:
Dpeta 2022-06-05 02:43:08 +02:00
parent 13608a3336
commit 91b09e270d

8
irc.py
View file

@ -735,8 +735,13 @@ class PesterHandler(DefaultCommandHandler):
# If it fails the old code is excecuted. # If it fails the old code is excecuted.
# Wait for server to send welcome to verify RPL_ISUPPORT has been send. # 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) time.sleep(0.1)
timeout += 1
# Get via metadata or via legacy method # Get via metadata or via legacy method
if self.parent.metadata_supported == True: if self.parent.metadata_supported == True:
@ -750,6 +755,7 @@ class PesterHandler(DefaultCommandHandler):
self.parent.setConnectionBroken() self.parent.setConnectionBroken()
else: else:
# Legacy # Legacy
PchumLog.warning("Server doesn't seem to support metadata, using legacy GETMOOD.")
chumglub = "GETMOOD " chumglub = "GETMOOD "
for c in chums: for c in chums:
chandle = c.handle chandle = c.handle