blob: c0e8a0b08fb1e5a6b8f64a5e99a2ed60208722d0 [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001SYNOPSIS
Zesstrad59c3892019-11-28 20:53:39 +01002 int execute_command(string command, object origin, object player)
MG Mud User88f12472016-06-24 23:31:02 +02003
Zesstra715ec202025-07-09 22:18:31 +02004DESCRIPTION
5 Low-level access to the command parser: take the <command>, parse it
6 into verb and argument and call the appropriate action added to
7 <origin> (read: <origin> is the object 'issuing' the command).
8 For the execution of the function(s), this_player() is set to
9 player. The function also sets results of query_command() and
10 query_verb() to match the given <command>.
MG Mud User88f12472016-06-24 23:31:02 +020011
Zesstra715ec202025-07-09 22:18:31 +020012 The result is non-0 if the command was found and execute, and 0
13 otherwise.
MG Mud User88f12472016-06-24 23:31:02 +020014
Zesstra715ec202025-07-09 22:18:31 +020015 The efun raises a privilege violation ("execute_command",
16 this_object(), origin, command).
MG Mud User88f12472016-06-24 23:31:02 +020017
Zesstra715ec202025-07-09 22:18:31 +020018 Note that this function does not use the H_MODIFY_COMMAND
19 and H_NOTIFY_FAIL hooks; the notify_fail() efun is can be used,
20 but must be evaluated by the caller.
21
22HISTORY
23 Introduced in LDMud 3.2.7.
24
25SEE ALSO
26 hooks(C), match_command(E), command(E), notify_fail(E),
27 command_stack(E)