mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-28 05:29:25 +01:00
relay: only check for duplicate modes if prefix is '+'
This commit is contained in:
parent
48aa0c3160
commit
c889cf6513
@ -494,7 +494,7 @@ def relayModes(irc, remoteirc, sender, channel, modes=None):
|
|||||||
log.debug("(%s) Relay mode: argument found as (%r, %r) "
|
log.debug("(%s) Relay mode: argument found as (%r, %r) "
|
||||||
"for network %r.",
|
"for network %r.",
|
||||||
irc.name, modechar, arg, remoteirc.name)
|
irc.name, modechar, arg, remoteirc.name)
|
||||||
if arg in remoteirc.channels[remotechan].prefixmodes[name+'s']:
|
if prefix == '+' and arg in remoteirc.channels[remotechan].prefixmodes[name+'s']:
|
||||||
# Don't set prefix modes that are already set.
|
# Don't set prefix modes that are already set.
|
||||||
log.debug("(%s) Relay mode: skipping setting %s on %s/%s because it appears to be already set.",
|
log.debug("(%s) Relay mode: skipping setting %s on %s/%s because it appears to be already set.",
|
||||||
irc.name, name, arg, remoteirc.name)
|
irc.name, name, arg, remoteirc.name)
|
||||||
@ -508,7 +508,7 @@ def relayModes(irc, remoteirc, sender, channel, modes=None):
|
|||||||
break
|
break
|
||||||
# Don't set modes that are already set, to prevent floods on TS6
|
# Don't set modes that are already set, to prevent floods on TS6
|
||||||
# where the same mode can be set infinite times.
|
# where the same mode can be set infinite times.
|
||||||
if modepair in remoteirc.channels[remotechan].modes:
|
if prefix == '+' and modepair in remoteirc.channels[remotechan].modes:
|
||||||
log.debug("(%s) Relay mode: skipping setting mode (%r, %r) on %s%s because it appears to be already set.",
|
log.debug("(%s) Relay mode: skipping setting mode (%r, %r) on %s%s because it appears to be already set.",
|
||||||
irc.name, supported_char, arg, remoteirc.name, remotechan)
|
irc.name, supported_char, arg, remoteirc.name, remotechan)
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user