aboutsummaryrefslogtreecommitdiff
path: root/modules/bot_channel.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/bot_channel.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/bot_channel.py')
-rw-r--r--modules/bot_channel.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/bot_channel.py b/modules/bot_channel.py
index cbe50119..2e2ff6fb 100644
--- a/modules/bot_channel.py
+++ b/modules/bot_channel.py
@@ -1,12 +1,11 @@
-
+from src import Utils
class Module(object):
def __init__(self, bot, events, exports):
- events.on("received.numeric.001").hook(self.do_join)
-
exports.add("serverset", {"setting": "bot-channel",
"help": "Set main channel"})
+ @Utils.hook("received.numeric.001")
def do_join(self, event):
event["server"].send_join(event["server"].get_setting("bot-channel",
"#bitbot"))