prefix formatted KICKs with "- "

This commit is contained in:
jesopo 2019-08-16 16:09:57 +01:00
parent 0b192d0feb
commit fd0ad283f8

View file

@ -162,10 +162,13 @@ class Module(ModuleManager.BaseModule):
reason = "" reason = ""
if event["reason"]: if event["reason"]:
reason = " (%s)" % event["reason"] reason = " (%s)" % event["reason"]
line = "%s kicked %s from %s%s" % ( line_minimal = "%s kicked %s from %s%s" % (
event["user"].nickname, nickname, event["channel"].name, reason) event["user"].nickname, nickname, event["channel"].name, reason)
line = "- %s" % line_minimal
self._event("kick", event["server"], line, event["channel"].name, self._event("kick", event["server"], line, event["channel"].name,
channel=event["channel"], user=event.get("user", None)) channel=event["channel"], user=event.get("user", None),
minimal=line_minimal)
@utils.hook("received.kick") @utils.hook("received.kick")
def kick(self, event): def kick(self, event):
self._on_kick(event, event["target_user"].nickname) self._on_kick(event, event["target_user"].nickname)