diff options
author | tv <tv@nomic.retiolum> | 2014-04-25 12:52:35 +0200 |
---|---|---|
committer | tv <tv@nomic.retiolum> | 2014-04-25 12:52:35 +0200 |
commit | 0f3e5bae6b85e0dffc59af75ec73fdc762c24e9e (patch) | |
tree | 3c3bf370119e296dc2a76201ad5df01c33bfe07b /titlebot/titlebot.py | |
parent | e957c40e5ad65c3088454ef0463d7ae42452196b (diff) | |
parent | dc1edc3f74d9b57579c454cbc21b7060836f2f49 (diff) |
Merge branch 'master' of github:krebscode/painload
Diffstat (limited to 'titlebot/titlebot.py')
-rw-r--r-- | titlebot/titlebot.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/titlebot/titlebot.py b/titlebot/titlebot.py index d04789c..dc4e28a 100644 --- a/titlebot/titlebot.py +++ b/titlebot/titlebot.py @@ -33,7 +33,7 @@ def default_command(cmd): 'capname': cmd, 'pattern': '^(?:' + name + '|\\*):\\s*' + cmd + '\\s*(?:\\s+(?P<args>.*))?$', 'argv': [ 'commands/' + cmd ] } -def dot_command(cmd): +def titlebot_cmd(cmd): return { 'capname': cmd, 'pattern': '\\.' + cmd + '\\s*(?:\\s+(?P<args>.*))?$', @@ -46,19 +46,19 @@ public_commands = [ default_command('rev'), default_command('uptime'), default_command('nocommand'), - dot_command('list'), - dot_command('help'), - dot_command('up'), - dot_command('new'), - dot_command('undo'), - dot_command('down'), + titlebot_cmd('list'), + titlebot_cmd('help'), + titlebot_cmd('up'), + titlebot_cmd('new'), + titlebot_cmd('undo'), + titlebot_cmd('down'), # identify via direct connect { 'capname': 'identify', - 'pattern': 'identify' + '\\s*(?:\\s+(?P<args>.*))?$', + 'pattern': '^identify' + '\\s*(?:\\s+(?P<args>.*))?$', 'argv' : [ 'commands/identify' ]} ] commands = [ default_command('reload'), - dot_command('clear') + titlebot_cmd('clear') ] |