fix exception block

This commit is contained in:
Dpeta 2022-03-17 04:36:14 +00:00
parent 4571b6dce7
commit b0e19aa9fb

9
irc.py
View file

@ -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: