aboutsummaryrefslogtreecommitdiff
path: root/modules/print_activity.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-01-17 14:50:07 +0000
committerGravatar jesopo2019-01-17 14:50:07 +0000
commit588b54b40b9dd82f732a95427ac158e73446284a (patch)
tree8483d72c909bee18ff4aa764f222bc91b8ae98b3 /modules/print_activity.py
parentClarify github webhook event names with some comments (github.py) (diff)
signature
Print when we send notices (print_activity.py)
Diffstat (limited to 'modules/print_activity.py')
-rw-r--r--modules/print_activity.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/modules/print_activity.py b/modules/print_activity.py
index eb2683c2..bf1abbe2 100644
--- a/modules/print_activity.py
+++ b/modules/print_activity.py
@@ -39,16 +39,24 @@ class Module(ModuleManager.BaseModule):
self._on_message(event, event["server"].get_user(
event["server"].nickname))
- def _on_notice(self, event, target):
+ def _on_notice(self, event, sender, target):
self.print_line(event, "(notice->%s) <%s> %s" % (
target, event["user"].nickname, event["message"]))
@utils.hook("received.notice.channel",
priority=EventManager.PRIORITY_HIGH)
def channel_notice(self, event):
- self._on_notice(event, event["channel"].name)
+ self._on_notice(event, event["user"].nickname, event["channel"].name)
+ @utils.hook("send.notice.channel")
+ def self_notice_channel(self, event):
+ self._on_notice(event, event["server"].nickname, event["channel"].name)
+
@utils.hook("received.notice.private", priority=EventManager.PRIORITY_HIGH)
def private_notice(self, event):
- self._on_notice(event, event["server"].nickname)
+ self._on_notice(event, event["user"].nickname, event["server"].nickname)
+ @utils.hook("send.notice.private")
+ def self_private_notice(self, event):
+ self._on_notice(event, event["server"].nickname, event["user"].nickname)
+
@utils.hook("received.server-notice", priority=EventManager.PRIORITY_HIGH)
def server_notice(self, event):
self.print_line(event, "(server notice) %s" % event["message"])