mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
Merge branch 'master' into devel
This commit is contained in:
commit
891039dba2
20
classes.py
20
classes.py
@ -1242,20 +1242,26 @@ class Protocol():
|
||||
log.debug("(%s/%s) our_ts: %s; their_ts: %s; is the mode origin us? %s", self.irc.name,
|
||||
channel, our_ts, their_ts, our_mode)
|
||||
|
||||
if our_mode:
|
||||
# If the source is us, the TS being used by sjoin() should be considered our TS.
|
||||
log.debug('(%s) Resetting channel TS of %s from %s to %s (outgoing)',
|
||||
self.irc.name, channel, self.irc.channels[channel].ts, their_ts)
|
||||
self.irc.channels[channel].ts = our_ts = their_ts
|
||||
|
||||
if their_ts == our_ts:
|
||||
log.debug("(%s/%s) remote TS of %s is equal to our %s; mode query %s",
|
||||
self.irc.name, channel, their_ts, our_ts, modes)
|
||||
# Their TS is equal to ours. Merge modes.
|
||||
_apply()
|
||||
|
||||
elif ((their_ts < our_ts) and (not our_mode)) or ((our_ts < their_ts) and our_mode):
|
||||
winning_ts = min(our_ts, their_ts)
|
||||
log.debug('(%s) Resetting channel TS of %s from %s to %s',
|
||||
self.irc.name, channel, self.irc.channels[channel].ts, winning_ts)
|
||||
self.irc.channels[channel].ts = winning_ts
|
||||
elif (their_ts < our_ts) and (not our_mode):
|
||||
log.debug('(%s) Resetting channel TS of %s from %s to %s (incoming)',
|
||||
self.irc.name, channel, self.irc.channels[channel].ts, their_ts)
|
||||
self.irc.channels[channel].ts = their_ts
|
||||
|
||||
if not our_mode: # Skip clearing if we're the one setting the mode.
|
||||
_clear()
|
||||
# Remote TS was lower and we're receiving modes. Clear the modelist an apply theirs.
|
||||
|
||||
_clear()
|
||||
_apply()
|
||||
|
||||
def _getSid(self, sname):
|
||||
|
@ -428,7 +428,6 @@ class TS6Protocol(TS6BaseProtocol):
|
||||
|
||||
modestring = args[2:-1] or args[2]
|
||||
parsedmodes = self.irc.parseModes(channel, modestring)
|
||||
self.irc.applyModes(channel, parsedmodes)
|
||||
namelist = []
|
||||
|
||||
# Keep track of other modes that are added due to prefix modes being joined too.
|
||||
|
Loading…
Reference in New Issue
Block a user