From 349cff36e11eff0c363d30c7704434ce15745f76 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 18 Dec 2015 21:53:35 -0800 Subject: [PATCH] protocols: in TOPIC hooks, send the topic as keyword "text" instead of keyword "topic" This is just to be more consistent, as other hooks usually use "text" for text fields. --- plugins/relay.py | 2 +- protocols/inspircd.py | 2 +- protocols/ts6.py | 2 +- protocols/ts6_common.py | 2 +- protocols/unreal.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/relay.py b/plugins/relay.py index f98530e..c68e180 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -917,7 +917,7 @@ utils.add_hook(handle_mode, 'MODE') def handle_topic(irc, numeric, command, args): channel = args['channel'] oldtopic = args.get('oldtopic') - topic = args['topic'] + topic = args['text'] if checkClaim(irc, channel, numeric): for name, remoteirc in world.networkobjects.items(): if irc.name == name or not remoteirc.connected.is_set(): diff --git a/protocols/inspircd.py b/protocols/inspircd.py index fad7b64..4e1cdfb 100644 --- a/protocols/inspircd.py +++ b/protocols/inspircd.py @@ -514,7 +514,7 @@ class InspIRCdProtocol(TS6BaseProtocol): topic = args[-1] self.irc.channels[channel].topic = topic self.irc.channels[channel].topicset = True - return {'channel': channel, 'setter': setter, 'ts': ts, 'topic': topic} + return {'channel': channel, 'setter': setter, 'ts': ts, 'text': topic} # SVSTOPIC is used by InspIRCd module m_topiclock - its arguments are the same as FTOPIC handle_svstopic = handle_ftopic diff --git a/protocols/ts6.py b/protocols/ts6.py index b3356c0..8592ce8 100644 --- a/protocols/ts6.py +++ b/protocols/ts6.py @@ -576,7 +576,7 @@ class TS6Protocol(TS6BaseProtocol): topic = args[-1] self.irc.channels[channel].topic = topic self.irc.channels[channel].topicset = True - return {'channel': channel, 'setter': setter, 'ts': ts, 'topic': topic} + return {'channel': channel, 'setter': setter, 'ts': ts, 'text': topic} def handle_invite(self, numeric, command, args): """Handles incoming INVITEs.""" diff --git a/protocols/ts6_common.py b/protocols/ts6_common.py index 5f7b409..0f59950 100644 --- a/protocols/ts6_common.py +++ b/protocols/ts6_common.py @@ -253,7 +253,7 @@ class TS6BaseProtocol(Protocol): 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, 'text': topic, 'oldtopic': oldtopic} def handle_part(self, source, command, args): diff --git a/protocols/unreal.py b/protocols/unreal.py index 8785593..a99b1a3 100644 --- a/protocols/unreal.py +++ b/protocols/unreal.py @@ -633,7 +633,7 @@ class UnrealProtocol(TS6BaseProtocol): 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, 'text': topic, 'oldtopic': oldtopic} def handle_whois(self, numeric, command, args):