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_PRINT_PROMPT, value) |
| 5 | |
| 6 | <value> being: |
| 7 | |
| 8 | void <name>(string prompt). |
| 9 | void <closure>(string prompt) |
| 10 | |
| 11 | DESCRIPTION |
| 12 | Optional hook to print the current command prompt. If this |
| 13 | hook is not set, the driver will just print the prompt to the |
| 14 | user. |
| 15 | |
| 16 | The hook is called with the prompt string as single argument |
| 17 | and has to print the prompt, e.g. using write() or |
| 18 | binary_message(). |
| 19 | |
| 20 | If the hook is a string, it is the name of an lfun in the |
| 21 | command giver. If the hook is a closure, it is called |
| 22 | with the command giver as previous object. |
| 23 | |
| 24 | HISTORY |
| 25 | Introduced in LDMud 3.3.163. |
| 26 | |
| 27 | SEE ALSO |
| 28 | hooks(C), default_prompt(H) |