From dda0abc6f522627e1308e752f7acada63352af63 Mon Sep 17 00:00:00 2001 From: Max Gurela Date: Wed, 27 Jul 2016 14:55:41 -0700 Subject: [PATCH] coretasks: tweak topic tracking Support different implementation of topic update, RPL_TOPIC appears to only be sent to the user who actually updated the topic. --- sopel/coretasks.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sopel/coretasks.py b/sopel/coretasks.py index 1cdf245009..5e25e32fe0 100644 --- a/sopel/coretasks.py +++ b/sopel/coretasks.py @@ -696,12 +696,16 @@ def track_notify(bot, trigger): @sopel.module.rule('.*') +@sopel.module.event('TOPIC') @sopel.module.event(events.RPL_TOPIC) @sopel.module.priority('high') @sopel.module.thread(False) @sopel.module.unblockable def track_topic(bot, trigger): - channel = trigger.args[1] + if trigger.event != 'TOPIC': + channel = trigger.args[1] + else: + channel = trigger.args[0] if channel not in bot.channels: return bot.channels[channel].topic = trigger.args[-1]