3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-03-01 20:10:44 +01:00

ircs2s_common: gracefully handle QUIT messages without a reason

Closes #663.
This commit is contained in:
James Lu 2021-02-14 22:39:57 -08:00
parent d9aa5e9869
commit 537c643ed0

View File

@ -687,7 +687,11 @@ class IRCS2SProtocol(IRCCommonProtocol):
# <- ABAAB Q :Killed (GL_ (bangbang))
userdata = self._remove_client(numeric)
if userdata:
return {'text': args[0], 'userdata': userdata}
try:
reason = args[0]
except IndexError:
reason = ''
return {'text': reason, 'userdata': userdata}
def handle_stats(self, numeric, command, args):
"""Handles the IRC STATS command."""