MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | SYNOPSIS |
| 2 | #include <sys/commands.h> |
| 3 | |
| 4 | mixed * match_command (string command, object origin) |
| 5 | |
| 6 | DESCRIPTION |
| 7 | Take the command <command>, parse it, and return an array of all |
| 8 | matching actions added to <origin> (read: <origin> is the object |
| 9 | 'issuing' the command). |
| 10 | |
| 11 | Each entry in the result array is itself an array of: |
| 12 | |
| 13 | string [CMDM_VERB]: The matched verb. |
| 14 | string [CMDM_ARG]: The argument string remaining, or 0 if none. |
| 15 | object [CMDM_OBJECT]: The object defining the action. |
| 16 | string [CMDM_FUN]: The name of the function to call in |
| 17 | CMDM_OBJECT, which may be static. |
| 18 | |
| 19 | The efun is useful for both debugging, and for implementing your |
| 20 | own H_COMMAND handling. |
| 21 | |
| 22 | HISTORY |
| 23 | Introduced in LDMud 3.3.259. |
| 24 | |
| 25 | SEE ALSO |
| 26 | hooks(C), execute_command(E), command(E), notify_fail(E), |
| 27 | command_stack(E) |