diff options
| author | 2018-09-19 12:35:34 +0100 | |
|---|---|---|
| committer | 2018-09-19 12:37:41 +0100 | |
| commit | b8aca728611d0422683347fdf3fc97b4f8651499 (patch) | |
| tree | 377d61f17b3a35849753314ec60a0f012956fb0c /modules | |
| parent | Send 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.py | 5 |
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!") |
