aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2018-09-19 12:35:34 +0100
committerGravatar jesopo2018-09-19 12:37:41 +0100
commitb8aca728611d0422683347fdf3fc97b4f8651499 (patch)
tree377d61f17b3a35849753314ec60a0f012956fb0c /modules
parentSend a FONT_RESET (\x0F) after stderr module names because a bug in weechat (diff)
signature
Support hooking functions in modules with @Utils.hook
Diffstat (limited to 'modules')
-rw-r--r--modules/pong.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/pong.py b/modules/pong.py
index 72987542..d67da431 100644
--- a/modules/pong.py
+++ b/modules/pong.py
@@ -1,8 +1,9 @@
-
+import Utils
class Module(object):
def __init__(self, bot, events, exports):
- events.on("received.command.ping").hook(self.pong, help="Ping pong!")
+ pass
+ @Utils.hook("received.command.ping", help="Ping pong!")
def pong(self, event):
event["stdout"].write("Pong!")