switch !to to !tell, add !to as an alias of !tell
This commit is contained in:
parent
e476fc44e7
commit
985e4704a0
1 changed files with 8 additions and 7 deletions
|
@ -15,13 +15,14 @@ class Module(ModuleManager.BaseModule):
|
||||||
if messages:
|
if messages:
|
||||||
event["channel"].del_user_setting(event["user"].get_id(), "to")
|
event["channel"].del_user_setting(event["user"].get_id(), "to")
|
||||||
|
|
||||||
@utils.hook("received.command.to", min_args=2, channel_only=True)
|
@utils.hook("received.command.to", alias_of="tell")
|
||||||
def to(self, event):
|
@utils.hook("received.command.tell")
|
||||||
"""
|
@utils.kwarg("min_args", 2)
|
||||||
:help: Relay a message to a user the next time they talk in this
|
@utils.kwarg("channel_only", True)
|
||||||
channel
|
@utils.kwarg("help",
|
||||||
:usage: <nickname> <message>
|
"Relay a message to a user the next time they talk in this channel")
|
||||||
"""
|
@utils.kwarg("usage", "<nickname> <message>")
|
||||||
|
def tell(self, event):
|
||||||
target_name = event["args_split"][0]
|
target_name = event["args_split"][0]
|
||||||
if not event["server"].has_user_id(target_name):
|
if not event["server"].has_user_id(target_name):
|
||||||
raise utils.EventError("I've never seen %s before" % target_name)
|
raise utils.EventError("I've never seen %s before" % target_name)
|
Loading…
Reference in a new issue