Skip to content

Commit

Permalink
Fix for empty quit message
Browse files Browse the repository at this point in the history
When a quit occurs and there is no quit message len(arguments) is 0 (arguments is an empty list) and so this line in _handle_other "arguments = [arguments[0]]" causes an "IndexError".
as i also posted here: jaraco#210
  • Loading branch information
OrpheusGr authored Aug 31, 2024
1 parent 8eac9f1 commit c207549
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion irc/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,10 @@ def _handle_message(self, arguments, command, source, tags):
def _handle_other(self, arguments, command, source, tags):
target = None
if command == "quit":
arguments = [arguments[0]]
if len(arguments) > 0:
arguments = [arguments[0]]
else:
arguments = [""]
elif command == "ping":
target = arguments[0]
else:
Expand Down

0 comments on commit c207549

Please sign in to comment.