From 9c4e0107f313171e14f0ce81323cb970f8845fc7 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sun, 13 Sep 2015 14:23:09 -0700 Subject: [PATCH] ts6_common: make old topic retrievable in handle_topic --- protocols/ts6_common.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/protocols/ts6_common.py b/protocols/ts6_common.py index ad52ad6..178d755 100644 --- a/protocols/ts6_common.py +++ b/protocols/ts6_common.py @@ -224,9 +224,11 @@ class TS6BaseProtocol(Protocol): channel = utils.toLower(self.irc, args[0]) topic = args[1] ts = int(time.time()) + oldtopic = self.irc.channels[channel].topic self.irc.channels[channel].topic = topic self.irc.channels[channel].topicset = True - return {'channel': channel, 'setter': numeric, 'ts': ts, 'topic': topic} + return {'channel': channel, 'setter': numeric, 'ts': ts, 'topic': topic, + 'oldtopic': oldtopic} def handle_part(self, source, command, args): """Handles incoming PART commands."""