RPL_CHANNELMODEIS fix

This commit is contained in:
Dpeta 2022-03-17 03:25:27 +00:00
parent e6ad257479
commit c32e54de7f
2 changed files with 3 additions and 16 deletions

3
irc.py
View file

@ -626,7 +626,8 @@ class PesterHandler(DefaultCommandHandler):
self.parent.inviteReceived.emit(handle, channel) self.parent.inviteReceived.emit(handle, channel)
def inviteonlychan(self, server, handle, channel, msg): def inviteonlychan(self, server, handle, channel, msg):
self.parent.chanInviteOnly.emit(channel) self.parent.chanInviteOnly.emit(channel)
def channelmodeis(self, server, handle, channel, modes): # This can cause a crash without mode_params, channelmodeis can have six arguments.
def channelmodeis(self, server, handle, channel, modes, mode_params):
self.parent.modesUpdated.emit(channel, modes) self.parent.modesUpdated.emit(channel, modes)
def cannotsendtochan(self, server, handle, channel, msg): def cannotsendtochan(self, server, handle, channel, msg):
self.parent.cannotSendToChan.emit(channel, msg) self.parent.cannotSendToChan.emit(channel, msg)

View file

@ -103,22 +103,8 @@ class CommandHandler(object):
return return
PchumLog.debug('f %s' % f) PchumLog.debug('f %s' % f)
#logging.info(*args)
# Because more than 5 arguments can be passed by channelmodeis
#try:
#if str(command) == 'channelmodeis':
# This might be stupid :)
# Update: This was very stupid
#f(*args[0:4])
#else:
f(*args) f(*args)
#except Exception as e:
# #logging.error('command raised '+ command + str())
# PchumLog.error('command args: ' + str([*args]))
# PchumLog.error('command raised %s' % e)
# PchumLog.error(traceback.format_exc())
# raise CommandError(command)
@protected @protected
def __unhandled__(self, cmd, *args): def __unhandled__(self, cmd, *args):