blob: 3efd0cb722972f651e2cac19ad950ca718c06624 [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001SYNOPSIS
Zesstrad59c3892019-11-28 20:53:39 +01002 #include <commands.h>
MG Mud User88f12472016-06-24 23:31:02 +02003
Zesstra715ec202025-07-09 22:18:31 +02004 mixed * command_stack(void)
MG Mud User88f12472016-06-24 23:31:02 +02005
Zesstra715ec202025-07-09 22:18:31 +02006DESCRIPTION
7 Return an array describing the current command stack. The array has
8 command_stack_depth() entries, the first describing the top-level
9 command, and the last describing the current one.
MG Mud User88f12472016-06-24 23:31:02 +020010
Zesstra715ec202025-07-09 22:18:31 +020011 Each entry is an array itself with these entries:
MG Mud User88f12472016-06-24 23:31:02 +020012
Zesstra715ec202025-07-09 22:18:31 +020013 string [CMD_VERB]: the verb of this command
14 string [CMD_TEXT]: the full command text
15 object [CMD_ORIGIN]: the original command giver
16 object [CMD_PLAYER]: the current command giver
17 mixed [CMD_FAIL]: the notify_fail setting (or 0).
18 mixed [CMD_FAILOBJ]: the object which set the notify_fail setting.
MG Mud User88f12472016-06-24 23:31:02 +020019
Zesstra715ec202025-07-09 22:18:31 +020020 CMD_ORIGIN and CMD_PLAYER are usually the same; there is a difference
21 only if the modify_command hook changes the command giver with
22 set_this_player().
MG Mud User88f12472016-06-24 23:31:02 +020023
Zesstra715ec202025-07-09 22:18:31 +020024 Note that any of the entries may be returned as 0.
Zesstrad59c3892019-11-28 20:53:39 +010025
Zesstra715ec202025-07-09 22:18:31 +020026HISTORY
27 Introduced in LDMud 3.2.7.
28 LDMud 3.2.8 added the CMD_FAILOBJ result.
MG Mud User88f12472016-06-24 23:31:02 +020029
Zesstra715ec202025-07-09 22:18:31 +020030SEE ALSO
MG Mud User88f12472016-06-24 23:31:02 +020031 command(E), command_stack_depth(E), notify_fail(E)