mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +01:00
pr/: add prefixmodes in sjoinServer if TS <= theirs
The old comparison of our TS < theirs was wrong, because modes are merged (not dropped) when two channels of the same TS join.
This commit is contained in:
parent
af02af6b4a
commit
05be3e6c17
@ -101,8 +101,8 @@ def sjoinServer(irc, server, channel, users, ts=None):
|
||||
irc.users[user].channels.add(channel)
|
||||
except KeyError: # Not initialized yet?
|
||||
log.debug("(%s) sjoinServer: KeyError trying to add %r to %r's channel list?", irc.name, channel, user)
|
||||
if ts < orig_ts:
|
||||
# Only save our prefix modes in the channel state if our TS is lower than theirs.
|
||||
if ts <= orig_ts:
|
||||
# Only save our prefix modes in the channel state if our TS is lower than or equal to theirs.
|
||||
utils.applyModes(irc, channel, changedmodes)
|
||||
namelist = ' '.join(namelist)
|
||||
_send(irc, server, "FJOIN {channel} {ts} {modes} :{users}".format(
|
||||
|
@ -117,8 +117,8 @@ def sjoinServer(irc, server, channel, users, ts=None):
|
||||
ts=ts, users=namelist, channel=channel,
|
||||
modes=utils.joinModes(modes)))
|
||||
irc.channels[channel].users.update(uids)
|
||||
if ts < orig_ts:
|
||||
# Only save our prefix modes in the channel state if our TS is lower than theirs.
|
||||
if ts <= orig_ts:
|
||||
# Only save our prefix modes in the channel state if our TS is lower than or equal to theirs.
|
||||
utils.applyModes(irc, channel, changedmodes)
|
||||
|
||||
def _sendModes(irc, numeric, target, modes, ts=None):
|
||||
|
Loading…
Reference in New Issue
Block a user