aboutsummaryrefslogtreecommitdiff
path: root/modules/ctcp.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-09-26 18:27:17 +0100
committerGravatar jesopo2018-09-26 18:27:17 +0100
commit51a52e2b0e54031cce5876f54d1d48c268b5441c (patch)
treea4c0e8e86c55aa701b06297d5b5a2ceebeaab60d /modules/ctcp.py
parentAlso 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.py2
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):