mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 09:19:23 +01:00
relay: fix mode relaying when sender is a client but isn't in any shared channels
This commit is contained in:
parent
dde9539e77
commit
bd2bd55e89
@ -538,10 +538,9 @@ def relayModes(irc, remoteirc, sender, channel, modes=None):
|
|||||||
# Don't send anything if there are no supported modes left after filtering.
|
# Don't send anything if there are no supported modes left after filtering.
|
||||||
if supported_modes:
|
if supported_modes:
|
||||||
# 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:
|
u = getRemoteUser(irc, remoteirc, sender, spawnIfMissing=False)
|
||||||
u = getRemoteUser(irc, remoteirc, sender, spawnIfMissing=False)
|
if u:
|
||||||
if u:
|
remoteirc.proto.modeClient(remoteirc, u, remotechan, supported_modes)
|
||||||
remoteirc.proto.modeClient(remoteirc, u, remotechan, supported_modes)
|
|
||||||
else:
|
else:
|
||||||
remoteirc.proto.modeServer(remoteirc, remoteirc.sid, remotechan, supported_modes)
|
remoteirc.proto.modeServer(remoteirc, remoteirc.sid, remotechan, supported_modes)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user