update channel.topic_setter-related code
This commit is contained in:
parent
03892d0ae3
commit
4ccfd821c8
3 changed files with 3 additions and 3 deletions
|
@ -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"])
|
||||
|
|
|
@ -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])
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue