MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | SYNOPSIS |
| 2 | void set_driver_hook(int what, closure arg) |
| 3 | void set_driver_hook(int what, string arg) |
| 4 | void set_driver_hook(int what, string * arg) |
| 5 | |
| 6 | DESCRIPTION |
| 7 | This privileged efun sets the driver hook 'what' (values are |
| 8 | defined in /sys/driver_hook.h) to 'arg'. |
| 9 | The exact meanings and types of 'arg' depend of the hook set. |
| 10 | To remove a hook, set 'arg' to 0. |
| 11 | |
| 12 | These hooks exist: |
| 13 | |
| 14 | H_MOVE_OBJECT0 |
| 15 | H_MOVE_OBJECT1 |
| 16 | arg: unbound lambda |
| 17 | Mandatory hooks implementing the move_object() efun. |
| 18 | |
| 19 | H_LOAD_UIDS |
| 20 | H_CLONE_UIDS |
| 21 | arg: unbound lambda or lfun closure |
| 22 | Mandatory hooks to determine the (e)uid of new objects. |
| 23 | |
| 24 | H_CREATE_SUPER |
| 25 | H_CREATE_OB |
| 26 | H_CREATE_CLONE |
| 27 | H_RESET |
| 28 | H_CLEAN_UP |
| 29 | arg: lambda closure (H_CLEAN_UP also accepts a lfun |
| 30 | closure), function name. |
| 31 | Optional hooks for creation/reset/clean up-actions. |
| 32 | |
| 33 | H_DEFAULT_METHOD |
| 34 | arg: lambda closure, lfun closure, function name. |
| 35 | Optional hook for default method implementation. |
| 36 | |
| 37 | H_DEFAULT_PROMPT |
| 38 | arg: lambda closure, lfun closure, prompt string. |
| 39 | Optional hook for the default command prompt. |
| 40 | |
| 41 | H_PRINT_PROMPT |
| 42 | arg: lambda closure, lfun closure, function name. |
| 43 | Optional hook to print the command prompt. |
| 44 | |
| 45 | H_MODIFY_COMMAND |
| 46 | arg: lambda closure, lfun closure, function name, mapping |
| 47 | Optional hook for modifying player commands before the |
| 48 | parser sees them. |
| 49 | |
| 50 | H_NOTIFY_FAIL |
| 51 | arg: lambda closure, lfun closure, string. |
| 52 | Mandatory hook to generate the default message if an entered |
| 53 | command couldn't be parsed and no notify_fail() command is |
| 54 | in effect. |
| 55 | |
| 56 | H_SEND_NOTIFY_FAIL |
| 57 | arg: lambda closure, lfun closure, string. |
| 58 | Optional hook to deliver the notify fail message from a failed |
| 59 | command. |
| 60 | |
| 61 | H_NO_IPC_SLOT |
| 62 | arg: string. |
| 63 | Optional hook specifying the 'sorry' messages if logins are |
| 64 | rejected due to fullness of the mud. |
| 65 | |
| 66 | H_INCLUDE_DIRS |
| 67 | arg: lambda closure, lfun closure, string array. |
| 68 | Semi-mandatory hook specifying the directories where <>-type |
| 69 | include files are searched. |
| 70 | |
| 71 | H_AUTO_INCLUDE |
| 72 | arg: lambda closure, lfun closure, string |
| 73 | Optional hook to specify a string to be included before the |
| 74 | source of every compiled LPC object. |
| 75 | |
| 76 | H_TELNET_NEG |
| 77 | arg: lambda closure, lfun closure, string. |
| 78 | Optional hook to specifiy how to perform a single telnet |
| 79 | negotiation. |
| 80 | |
| 81 | H_NOECHO |
| 82 | arg: lambda closure, lfun closure, string. |
| 83 | Optional hook to specifiy how to perform the telnet actions |
| 84 | to switch the echo mode (used for e.g. password input_to()s). |
| 85 | |
| 86 | H_ERQ_STOP |
| 87 | arg: lambda closure, lfun closure. |
| 88 | Optional hook to notify the mudlib about the termination of |
| 89 | the erq demon. |
| 90 | |
| 91 | See hooks(C) for a detailed discussion. |
| 92 | |
| 93 | HISTORY |
| 94 | Introduced in 3.2.1@1 as efun309(), renamed to |
| 95 | set_driver_hook() in 3.2.1@13 |
| 96 | |
| 97 | SEE ALSO |
| 98 | hooks(C) |