MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | SYNOPSIS |
| 2 | #include <sys/driver_hooks.h> |
| 3 | |
| 4 | set_driver_hook(H_SEND_NOTIFY_FAIL, value) |
| 5 | |
| 6 | <value> being: |
| 7 | |
| 8 | void <name>(string msg, object msgobj, object orig_cmd_giver) |
| 9 | void <closure>(string msg, object msgobj, object orig_cmd_giver) |
| 10 | |
| 11 | DESCRIPTION |
| 12 | Optional hook to send the notify fail message, regardless |
| 13 | of how it was determined, to the player. If the hook is not |
| 14 | set, the message is delivered using tell_object() internally. |
| 15 | Hook setting can be a string or a closure. |
| 16 | |
| 17 | If the hook is a string, it is the name of a (possibly static) |
| 18 | function to call in the current command giver. If the hook |
| 19 | is a closure, it is the function to be called. Lambda closures |
| 20 | are bound to the current command giver first. |
| 21 | |
| 22 | The arguments to the call are: |
| 23 | - <msg> is the notify fail message to be delivered. |
| 24 | - <msgobj> is the object which set the message. It is 0 for |
| 25 | the default message. |
| 26 | - <orig_cmd_giver> is the object for which the original |
| 27 | command was first received. It is usually identical with |
| 28 | the current command giver this_player(). |
| 29 | |
| 30 | HISTORY |
| 31 | |
| 32 | SEE ALSO |
| 33 | hooks(C), command(H), modify_command(H), modify_command_fname(H), |
| 34 | notify_fail(H) |