From b0e19aa9fb49b20e5106bf4c8d3a2a9254be87bb Mon Sep 17 00:00:00 2001 From: Dpeta Date: Thu, 17 Mar 2022 04:36:14 +0000 Subject: [PATCH] fix exception block --- irc.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/irc.py b/irc.py index e257258..d4cce51 100644 --- a/irc.py +++ b/irc.py @@ -543,8 +543,13 @@ class PesterHandler(DefaultCommandHandler): # Server-set usermodes don't need to be passed. if (handles == ['']) & ( ('x' in m) | ('z' in m) | ('o' in m) | ('x' in m) )!=True: - self.parent.userPresentUpdate.emit(handles[i], channel, m+":%s" % (op)) - + try: + self.parent.userPresentUpdate.emit(handles[i], channel, m+":%s" % (op)) + except IndexError as e: + PchumLog.exception("modeSetIndexError: %s" % e) + #print("i = " + i) + #print("m = " + m) + #self.parent.userPresentUpdate.emit(handles[i], channel, m+":%s" % (op)) #self.parent.userPresentUpdate.emit(handles[i], channel, m+":%s" % (op)) # Passing an empty handle here might cause a crash. #except IndexError: