blob: b59252906c68737b77a42cec232b89a8f8c2448a [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001SYNOPSIS
2 #include <sys/driver_hooks.h>
3
4 set_driver_hook(H_TELNET_NEG, value)
5
6 <value> being:
7
8 void <name>(int flag, object user, int no_telnet)
9 void <closure>(int flag, object user, int no_telnet)
10
11DESCRIPTION
12 Optional hook to specifiy how to perform the telnet actions to
13 switch the echo mode (used for e.g. password input_to()s).
14 Hook setting may be any closure or a string. If not set, a
15 default handling is performed.
16
17 If the setting is a string, it used as name of an lfun to call
18 in the interactive <user>, where <flag> is the echo-flag
19 passed to the input_to() statement.
20
21 If the setting is a closure, it is called with the same
22 arguments, and unbound lambda-closures being bound to
23 this_player() prior to execution.
24
25 <local> is a boolean flag: it is TRUE when input_to() was
26 called with the INPUT_NO_TELNET flag.
27
28 When set, the hook is called whenever the driver needs to
29 change the echo mode, thus you can negotiate about things that
30 are coupled with it, like LINEMODE or character-at-a-time.
31
32 IMPORTANT: If this hook is used, the control of all telnet
33 negotiation is transferred to the mudlib: all incoming negotiations
34 are passed to H_TELNET_NEG, and the sending of no-echo negotiations
35 is handled by this hook.
36
37HISTORY
38 LDMud 3.2.11/LDMud 3.3.593 added the <no_telnet> argument.
39
40SEE ALSO
41 hooks(C), telnet(C), telnet_neg(H)