ldmud/doc/applied/modify_command
Lars f84a2fc7a0 Initial import from PRCS.
git-svn-id: svn://svn.bearnip.com/ldmud/trunk@4 56160b6e-f8f8-0310-bd54-bccebfe6a2f2
2005-06-21 01:46:13 +00:00

27 lines
1 KiB
Text

SYNOPSIS
int|string <name>(string cmd)
DESCRIPTION
After set_modify_command(mob) was called for an interactive
object iob, all commands for that user will be passed to
mob-><name>(), and the return will then be checked for
actions. The actual name of the lfun to call is specified
by the H_MODIFY_COMMAND_FNAME hook - traditionally it's
'modify_command'.
If the result is a string, it is the new command to execute
instead of the given one. Note that it is not possible to
make several commands from one this way!
If the result is a non-zero number, the given command is to
be ignored. In case of the closure/lfun setting this may
mean that the closure/lfun already executed it.
If the result is 0, the originally given command is to be
used.
HISTORY
In 3.2.1@109 the name of the lfun to call must be specified
using the H_MODIFY_COMMAND_FNAME driver hook.
SEE ALSO
set_modify_command(E), hooks(C)