From 4ccfd821c8f99cb17bd78dd1f712595d8af8cc38 Mon Sep 17 00:00:00 2001 From: jesopo Date: Mon, 16 Sep 2019 18:41:47 +0100 Subject: [PATCH] update channel.topic_setter-related code --- modules/format_activity.py | 2 +- modules/line_handler/channel.py | 2 +- modules/stats.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/format_activity.py b/modules/format_activity.py index 2a01e5b0..0911f771 100644 --- a/modules/format_activity.py +++ b/modules/format_activity.py @@ -150,7 +150,7 @@ class Module(ModuleManager.BaseModule): event["topic"]) @utils.hook("received.333") def on_333(self, event): - self._on_topic(event, event["setter"], "set", + self._on_topic(event, event["setter"].nickname, "set", event["channel"].topic) unix_dt = datetime.datetime.utcfromtimestamp(event["set_at"]) diff --git a/modules/line_handler/channel.py b/modules/line_handler/channel.py index 1c571ce4..a7693b7e 100644 --- a/modules/line_handler/channel.py +++ b/modules/line_handler/channel.py @@ -24,7 +24,7 @@ def handle_333(events, event): channel.set_topic_setter(topic_setter) channel.set_topic_time(topic_time) events.on("received.333").call(channel=channel, - setter=topic_setter.nickname, set_at=topic_time, server=event["server"]) + setter=topic_setter, set_at=topic_time, server=event["server"]) def handle_353(event): channel = event["server"].channels.get(event["line"].args[2]) diff --git a/modules/stats.py b/modules/stats.py index 80e703c5..70b24497 100644 --- a/modules/stats.py +++ b/modules/stats.py @@ -108,7 +108,7 @@ class Module(ModuleManager.BaseModule): key=lambda nickname: nickname.lower()), "topic": channel.topic, "topic-set-at": channel.topic_time, - "topic-set-by": channel.topic_setter_nickname, + "topic-set-by": channel.topic_setter.nickname, "modes": channel.mode_str() } @utils.hook("api.get.channels")