mirror of
https://github.com/ldmud/ldmud
synced 2026-08-12 14:26:05 -04:00
Driver hooks that accepted lfun closures before can now handle any type of closure. Also the H_CREATE_* hooks can now handle any type of closure.
34 lines
1.3 KiB
Text
34 lines
1.3 KiB
Text
SYNOPSIS
|
|
#include <sys/driver_hooks.h>
|
|
|
|
set_driver_hook(H_SEND_NOTIFY_FAIL, value)
|
|
|
|
<value> being:
|
|
|
|
void <name>(string msg, object msgobj, object orig_cmd_giver)
|
|
void <closure>(string msg, object msgobj, object orig_cmd_giver)
|
|
|
|
DESCRIPTION
|
|
Optional hook to send the notify fail message, regardless
|
|
of how it was determined, to the player. If the hook is not
|
|
set, the message is delivered using tell_object() internally.
|
|
Hook setting can be a string or a closure.
|
|
|
|
If the hook is a string, it is the name of a (possibly static)
|
|
function to call in the current command giver. If the hook
|
|
is a closure, it is the function to be called. Unbound lambda
|
|
closures are bound to the current command giver first.
|
|
|
|
The arguments to the call are:
|
|
- <msg> is the notify fail message to be delivered.
|
|
- <msgobj> is the object which set the message. It is 0 for
|
|
the default message.
|
|
- <orig_cmd_giver> is the object for which the original
|
|
command was first received. It is usually identical with
|
|
the current command giver this_player().
|
|
|
|
HISTORY
|
|
|
|
SEE ALSO
|
|
hooks(C), command(H), modify_command(H), modify_command_fname(H),
|
|
notify_fail(H)
|