Topic: [SUGGESTION]def,undef,undefall,dump_defs commands in console
Hi all! I've written 4 new commands for tee console:
def ssr
undef s
undefall
dump_allcommand def allows you define a new command for console.
Syntax:
def command_name "Help message" "action"Example:
def hook_fire "Hooks and fires at one time" "+hook;+fire"then you can use them just like any command:
bind p hook_fireDefined commands are saved to config file on exit and aer loaded on console init.
They are showed in command list with help just like any other command.
You can undefine defined commands using undef command:
undef hook_fireOr undefine all commands using
undefallYou can watch list of defines:
dump_defsDefined commands are protected from recursive calls:
def recurse "Trying to raise an error" recurse
recursewill not raise an error. It'll write:
Recursive calls are prohibited!I suggest to include this function in new version.
P.S. Have I got rights to upload files to svn of Teeworlds?
P.P.S. In archive there is a patch to 0.5.x version and 2 new files, please check if all is ok(it's my first patch)

. Finally I'm not really sure if this is needed, because your "trigger buttons" which you described above, are almost the same that can be achieved using the exec commad.