mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +01:00
Clientbot: unconditionally block MODE hooks if we're the sender
This is another check to prevent possible infinite loops in MODE syncing.
This commit is contained in:
parent
72ca41df33
commit
5c2e7e9324
@ -606,6 +606,10 @@ class ClientbotWrapperProtocol(Protocol):
|
||||
log.debug('(%s) Suppressing MODE change hook for internal client %s', self.irc.name, target)
|
||||
return
|
||||
if changedmodes:
|
||||
# Prevent infinite loops: don't send MODE hooks if the sender is US.
|
||||
# Note: this is not the only check in Clientbot to prevent mode loops: if our nick
|
||||
# somehow gets desynced, this may not catch everything it's supposed to.
|
||||
if (self.irc.pseudoclient and source != self.irc.pseudoclient.uid) or not self.irc.pseudoclient:
|
||||
return {'target': target, 'modes': changedmodes, 'channeldata': oldobj}
|
||||
|
||||
def handle_nick(self, source, command, args):
|
||||
|
Loading…
Reference in New Issue
Block a user