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:
parent
d9aa5e9869
commit
537c643ed0
@ -687,7 +687,11 @@ class IRCS2SProtocol(IRCCommonProtocol):
|
|||||||
# <- ABAAB Q :Killed (GL_ (bangbang))
|
# <- ABAAB Q :Killed (GL_ (bangbang))
|
||||||
userdata = self._remove_client(numeric)
|
userdata = self._remove_client(numeric)
|
||||||
if userdata:
|
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):
|
def handle_stats(self, numeric, command, args):
|
||||||
"""Handles the IRC STATS command."""
|
"""Handles the IRC STATS command."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user