You are viewing Revision 1 of APIs_RegCommand

This page is registered as a special page, however you are viewing a previous revision of the page. As such, the special page function will not be triggered.

Subroutine Name

RegCommand

Explanation and Usage

This will register a command, which will be called via the 'do' parameter (do=action).

Syntax

RegCommand(Name, Subroutine)

Options

Name - This is the name to associate with the action.

Subroutine - This should be the subroutine that is called when the action you specify is called via the 'do' parameter. Must be entered in this format: \&SubroutineName

Examples

These are actual examples from the Aneuch source code:

RegCommand('admin', \&DoAdmin);
This will register the command 'admin', and specify that the subroutine DoAdmin should be called. This would take place by the user calling "?do=admin".