From 2008df047c16f129d96113463a6b0017a5cadc8e Mon Sep 17 00:00:00 2001 From: James Lu Date: Sun, 8 Nov 2015 15:14:03 -0800 Subject: [PATCH] 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 --- protocols/inspircd.py | 3 ++- protocols/ts6.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/protocols/inspircd.py b/protocols/inspircd.py index 8bc0863..7f2dfe1 100644 --- a/protocols/inspircd.py +++ b/protocols/inspircd.py @@ -94,7 +94,8 @@ class InspIRCdProtocol(TS6BaseProtocol): raise LookupError('No such PyLink PseudoClient exists.') 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, time.strftime("%c", time.localtime(ts))) diff --git a/protocols/ts6.py b/protocols/ts6.py index a32bfbd..8131042 100644 --- a/protocols/ts6.py +++ b/protocols/ts6.py @@ -91,7 +91,8 @@ class TS6Protocol(TS6BaseProtocol): raise LookupError('No such PyLink PseudoClient exists.') 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, time.strftime("%c", time.localtime(ts)))