mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-25 20:22:45 +01:00
relay: fix the wrong modes being propagated to the wrong channels
tl;dr, this was two bugs in one! Closes #53.
This commit is contained in:
parent
64adb79120
commit
ccf759679b
@ -362,7 +362,7 @@ def relayModes(irc, remoteirc, sender, channel, modes=None):
|
|||||||
if remotechan is None:
|
if remotechan is None:
|
||||||
return
|
return
|
||||||
if modes is None:
|
if modes is None:
|
||||||
modes = remoteirc.channels[remotechan].modes
|
modes = irc.channels[channel].modes
|
||||||
log.debug('(%s) Relay mode: channel data for %s%s: %s', irc.name, remoteirc.name, remotechan, remoteirc.channels[remotechan])
|
log.debug('(%s) Relay mode: channel data for %s%s: %s', irc.name, remoteirc.name, remotechan, remoteirc.channels[remotechan])
|
||||||
supported_modes = []
|
supported_modes = []
|
||||||
log.debug('(%s) Relay mode: initial modelist for %s is %s', irc.name, channel, modes)
|
log.debug('(%s) Relay mode: initial modelist for %s is %s', irc.name, channel, modes)
|
||||||
@ -396,9 +396,9 @@ def relayModes(irc, remoteirc, sender, channel, modes=None):
|
|||||||
# Check if the sender is a user; remember servers are allowed to set modes too.
|
# Check if the sender is a user; remember servers are allowed to set modes too.
|
||||||
if sender in irc.users:
|
if sender in irc.users:
|
||||||
u = getRemoteUser(irc, remoteirc, sender)
|
u = getRemoteUser(irc, remoteirc, sender)
|
||||||
remoteirc.proto.modeClient(remoteirc, u, channel, supported_modes)
|
remoteirc.proto.modeClient(remoteirc, u, remotechan, supported_modes)
|
||||||
else:
|
else:
|
||||||
remoteirc.proto.modeServer(remoteirc, remoteirc.sid, channel, supported_modes)
|
remoteirc.proto.modeServer(remoteirc, remoteirc.sid, remotechan, supported_modes)
|
||||||
|
|
||||||
def handle_mode(irc, numeric, command, args):
|
def handle_mode(irc, numeric, command, args):
|
||||||
target = args['target']
|
target = args['target']
|
||||||
|
Loading…
Reference in New Issue
Block a user