aboutsummaryrefslogtreecommitdiff
path: root/modules/to.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-09-30 17:29:09 +0100
committerGravatar jesopo2018-09-30 17:29:09 +0100
commit10ef985a8a849a6bbfa8cbb63c2548e42ffb3957 (patch)
tree4da29ff0462ca69820d81aa95afb4b261ab3213c /modules/to.py
parentreceived.command takes a final [command] part (diff)
signature
Switch to using docstring for usage, permission and require_mode
Diffstat (limited to 'modules/to.py')
-rw-r--r--modules/to.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/to.py b/modules/to.py
index 2bfe410d..2136d0c0 100644
--- a/modules/to.py
+++ b/modules/to.py
@@ -11,11 +11,12 @@ class Module(ModuleManager.BaseModule):
if messages:
event["channel"].del_user_setting(event["user"].get_id(), "to")
- @Utils.hook("received.command.to", min_args=2, channel_only=True,
- usage="<username> <message>")
+ @Utils.hook("received.command.to", min_args=2, channel_only=True)
def to(self, event):
"""
- Relay a message to a user the next time they talk in this channel"
+ :help: Relay a message to a user the next time they talk in this
+ channel
+ :usage: <nickname> <message>
"""
target_user = event["server"].get_user(event["args_split"][0])
messages = event["target"].get_user_setting(target_user.get_id(),