Added arg_regex, an optional Command class-method for customizing how commands are identified by using a regex to enforce a specific look/grammar to the command argument. Discussed and suggested in issue 213.

This commit is contained in:
Griatch 2012-02-27 20:56:01 +01:00
parent 42254fa3c4
commit 690bfadd9d
4 changed files with 13 additions and 3 deletions

View file

@ -49,6 +49,7 @@ class CmdLook(MuxCommand):
key = "look"
aliases = ["l", "ls"]
locks = "cmd:all()"
arg_regex = r"\s.*?|$"
def func(self):
"""