diff options
| author | 2019-02-15 19:58:51 +0000 | |
|---|---|---|
| committer | 2019-02-15 19:58:51 +0000 | |
| commit | e51c653c1e280331b7d540f755fcd6b7aa7a5389 (patch) | |
| tree | 7f37bee13cade0f04650164486b7f6f1b506c64a /modules/print_activity.py | |
| parent | Actually grab resume timestamp before it's overwritten (resume.py) (diff) | |
| signature | ||
Parse and print when we send QUIT commands (line_handler, print_activity)
Diffstat (limited to 'modules/print_activity.py')
| -rw-r--r-- | modules/print_activity.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/print_activity.py b/modules/print_activity.py index c0618dd5..43a69533 100644 --- a/modules/print_activity.py +++ b/modules/print_activity.py @@ -89,10 +89,16 @@ class Module(ModuleManager.BaseModule): self.print_line(event, "%s changed nickname to %s" % ( event["old_nickname"], event["new_nickname"])) + def _quit(self, event, nickname, reason): + self.print_line(event, "%s quit%s" % (nickname, + "" if not reason else " (%s)" % reason)) + @utils.hook("received.quit") def on_quit(self, event): - self.print_line(event, "%s quit%s" % (event["user"].nickname, - "" if not event["reason"] else " (%s)" % event["reason"])) + self._quit(event, event["user"].nickname, event["reason"]) + @utils.hook("send.quit") + def send_quit(self, event): + self._quit(event, event["server"].nickname, event["reason"]) def _on_kick(self, event, nickname): self.print_line(event, "%s kicked %s from %s%s" % ( |
