mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-25 12:12:53 +01:00
relay: don't spawn new pseudoclients for mode changes
This commit is contained in:
parent
f5df4008f4
commit
c0f82597a5
@ -475,10 +475,11 @@ def relayModes(irc, remoteirc, sender, channel, modes=None):
|
||||
if supported_modes:
|
||||
# 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)
|
||||
remoteirc.proto.modeClient(remoteirc, u, remotechan, supported_modes)
|
||||
else:
|
||||
remoteirc.proto.modeServer(remoteirc, remoteirc.sid, remotechan, supported_modes)
|
||||
u = getRemoteUser(irc, remoteirc, sender, spawnIfMissing=False)
|
||||
if u:
|
||||
remoteirc.proto.modeClient(remoteirc, u, remotechan, supported_modes)
|
||||
return
|
||||
remoteirc.proto.modeServer(remoteirc, remoteirc.sid, remotechan, supported_modes)
|
||||
|
||||
def getSupportedUmodes(irc, remoteirc, modes):
|
||||
supported_modes = []
|
||||
|
Loading…
Reference in New Issue
Block a user