diff options
| author | 2018-09-26 18:27:17 +0100 | |
|---|---|---|
| committer | 2018-09-26 18:27:17 +0100 | |
| commit | 51a52e2b0e54031cce5876f54d1d48c268b5441c (patch) | |
| tree | a4c0e8e86c55aa701b06297d5b5a2ceebeaab60d /modules/ctcp.py | |
| parent | Also use docstrings to check if a command has help available, allow one-string (diff) | |
| signature | ||
Switch to using @Utils.hook and docstrings for event hooks
Diffstat (limited to 'modules/ctcp.py')
| -rw-r--r-- | modules/ctcp.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/ctcp.py b/modules/ctcp.py index a9144974..efb855fb 100644 --- a/modules/ctcp.py +++ b/modules/ctcp.py @@ -4,11 +4,11 @@ from src import Utils class Module(object): def __init__(self, bot, events, exports): self.bot = bot - events.on("received.message.private").hook(self.private_message) exports.add("serverset", {"setting": "ctcp-responses", "help": "Set whether I respond to CTCPs on this server", "validate": Utils.bool_or_none}) + @Utils.hook("received.message.private") def private_message(self, event): if event["message"][0] == "\x01" and event["message"][-1] == "\x01": if event["server"].get_setting("ctcp-responses", True): |
