_on_topic doesn't always have a user

This commit is contained in:
jesopo 2020-01-17 18:13:35 +00:00
parent 3f2f6cb82c
commit 631e669426

View file

@ -177,8 +177,8 @@ class Module(ModuleManager.BaseModule):
line = "- %s" % minimal
self._event("topic", event["server"], line, event["channel"].name,
channel=event["channel"], user=event["user"], minimal=minimal,
formatting=formatting)
channel=event["channel"], user=event.get("user", None),
minimal=minimal, formatting=formatting)
@utils.hook("received.topic")
def on_topic(self, event):
self._on_topic(event, event["user"].nickname, "changed",