395
edits
Philosopher (talk | contribs) m (→addcommand(): & logprint() (both are James' work)) |
Philosopher (talk | contribs) |
||
Line 46: | Line 46: | ||
Add a fgcommand which can be used like a regular fgcommand (global scope, etc.). First argument is the name, second is the function to run. Note that this fgcommand will always return true! Inside the callback/function one can use either cmdarg() to retrieve the arguments or use the first argument passed to the function (since they will be the same). | Add a fgcommand which can be used like a regular fgcommand (global scope, etc.). First argument is the name, second is the function to run. Note that this fgcommand will always return true! Inside the callback/function one can use either cmdarg() to retrieve the arguments or use the first argument passed to the function (since they will be the same). | ||
=== <tt>removecommand()</tt> === | |||
As you can guess, there's also a removecommand() function which will remove '''any''' command – even those implemented in C++! As such it can be very dangerous and remove core functionality, so use with caution. | |||
=== <tt>logprint()</tt> === | === <tt>logprint()</tt> === |
edits