ldmud-3.3.719/
ldmud-3.3.719/doc/
ldmud-3.3.719/doc/efun.de/
ldmud-3.3.719/doc/efun/
ldmud-3.3.719/doc/man/
ldmud-3.3.719/doc/other/
ldmud-3.3.719/mud/
ldmud-3.3.719/mud/heaven7/
ldmud-3.3.719/mud/lp-245/
ldmud-3.3.719/mud/lp-245/banish/
ldmud-3.3.719/mud/lp-245/doc/
ldmud-3.3.719/mud/lp-245/doc/examples/
ldmud-3.3.719/mud/lp-245/doc/sefun/
ldmud-3.3.719/mud/lp-245/log/
ldmud-3.3.719/mud/lp-245/obj/Go/
ldmud-3.3.719/mud/lp-245/players/lars/
ldmud-3.3.719/mud/lp-245/room/death/
ldmud-3.3.719/mud/lp-245/room/maze1/
ldmud-3.3.719/mud/lp-245/room/sub/
ldmud-3.3.719/mud/lp-245/secure/
ldmud-3.3.719/mud/sticklib/
ldmud-3.3.719/mud/sticklib/src/
ldmud-3.3.719/mudlib/deprecated/
ldmud-3.3.719/mudlib/uni-crasher/
ldmud-3.3.719/pkg/
ldmud-3.3.719/pkg/debugger/
ldmud-3.3.719/pkg/diff/
ldmud-3.3.719/pkg/misc/
ldmud-3.3.719/src/
ldmud-3.3.719/src/autoconf/
ldmud-3.3.719/src/ptmalloc/
ldmud-3.3.719/src/util/
ldmud-3.3.719/src/util/erq/
ldmud-3.3.719/src/util/indent/hosts/next/
ldmud-3.3.719/src/util/xerq/
ldmud-3.3.719/src/util/xerq/lpc/
ldmud-3.3.719/src/util/xerq/lpc/www/
ldmud-3.3.719/test/generic/
ldmud-3.3.719/test/inc/
ldmud-3.3.719/test/t-0000398/
ldmud-3.3.719/test/t-0000548/
ldmud-3.3.719/test/t-030925/
ldmud-3.3.719/test/t-040413/
ldmud-3.3.719/test/t-041124/
ldmud-3.3.719/test/t-language/
SYNOPSIS
        #include <sys/driver_hooks.h>

        set_driver_hook(H_MODIFY_COMMAND, value)

        <value> being:

          int|string <closure>(string cmd, object player)
          int|string <name>(string cmd)
          <mapping>

DESCRIPTION
        Optional hook to modify commands (both entered or given by a
        call to command()) before the parser sees them (this includes
        special commands like 'status').

        Hook setting can be any closure, the name of the function to
        call in the object, or a mapping.

        For interactives this hook is used only if the interactive
        object has no command modifier already set by the efun
        set_modify_command().

        If the hook is a closure, it is called with the entered
        command as first, and the command giving player as second
        argument. Lambda closures are bound to the command giving player,
        unbound-lambda closures remain unbound.

        If the hook is a string, it is used as the name of an lfun
        in the command giving player, which is called with the command
        as argument.

        If the hook is a mapping, it is queried with the given command
        as index, and the data retrieved is used as new command
        (defaults to 0 if no data is stored for a given command). If
        an entry is a closure instead of a string, it is called as

          int|string <closure>(string cmd, object player)

        and the result from the call is used as 'the' command.

        The result is treated equal in all three cases:
         - 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.

        It is possible for the hook to change the command giver
        (this_player()) for the execution of the command. This means that
        even though the commands are execute for the original commandgiver,
        this_player() will return the changed commandgiver.

HISTORY

SEE ALSO
        hooks(C), command(H), modify_command_fname(H), notify_fail(H),
        send_notify_fail(H)