3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 01:09:22 +01:00

clientbot: only send MODE if there are modes left after filtering

This commit is contained in:
James Lu 2016-09-25 20:21:01 -07:00
parent 57b566286d
commit 1cb320f5f4

View File

@ -200,8 +200,9 @@ class ClientbotWrapperProtocol(Protocol):
extmodes.append(modepair)
log.debug('(%s) mode: filtered modes for %s: %s', self.irc.name, channel, extmodes)
self.irc.send('MODE %s %s' % (channel, self.irc.joinModes(extmodes)))
# Don't update the state here: the IRCd sill respond with a MODE reply if successful.
if extmodes:
self.irc.send('MODE %s %s' % (channel, self.irc.joinModes(extmodes)))
# Don't update the state here: the IRCd sill respond with a MODE reply if successful.
def nick(self, source, newnick):
"""STUB: Sends NICK changes."""