3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-17 23:52:49 +01:00

Fix logic in last commit

ts has to be set to orig_ts if missing, otherwise a later comparison would try to check for None <= some int, which would error
This commit is contained in:
James Lu 2015-11-08 15:14:03 -08:00
parent b0e66ddd6e
commit 2008df047c
2 changed files with 4 additions and 2 deletions

View File

@ -94,7 +94,8 @@ class InspIRCdProtocol(TS6BaseProtocol):
raise LookupError('No such PyLink PseudoClient exists.') raise LookupError('No such PyLink PseudoClient exists.')
orig_ts = self.irc.channels[channel].ts orig_ts = self.irc.channels[channel].ts
self.updateTS(channel, ts or orig_ts) ts = ts or orig_ts
self.updateTS(channel, ts)
log.debug("sending SJOIN to %s%s with ts %s (that's %r)", channel, self.irc.name, ts, log.debug("sending SJOIN to %s%s with ts %s (that's %r)", channel, self.irc.name, ts,
time.strftime("%c", time.localtime(ts))) time.strftime("%c", time.localtime(ts)))

View File

@ -91,7 +91,8 @@ class TS6Protocol(TS6BaseProtocol):
raise LookupError('No such PyLink PseudoClient exists.') raise LookupError('No such PyLink PseudoClient exists.')
orig_ts = self.irc.channels[channel].ts orig_ts = self.irc.channels[channel].ts
self.updateTS(channel, ts or orig_ts) ts = ts or orig_ts
self.updateTS(channel, ts)
log.debug("(%s) sending SJOIN to %s with ts %s (that's %r)", self.irc.name, channel, ts, log.debug("(%s) sending SJOIN to %s with ts %s (that's %r)", self.irc.name, channel, ts,
time.strftime("%c", time.localtime(ts))) time.strftime("%c", time.localtime(ts)))