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: