blob: 2ac77b7e6e4e8f301511dab7ffe3f18651939541 [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001SYNOPSIS
2 #include <interactive_info.h>
3
4 mixed interactive_info(object ob, int what)
5
6DESCRIPTION
7 Returns some internal information about the interactive user <ob>.
8 The argument <what> determines which information is returned.
9
10 It can be either a configuration option as given to
11 configure_interactive() or one of the following options:
12
13
14
15 Connection Information:
16
17 <what> == II_IP_NAME:
18 The hostname of <ob>. The hostname will asynchronously
19 looked up by the ERQ daemon and might therefore not be
20 available at the time of the first connection.
21 If no name is available the address will be returned.
22
23 <what> == II_IP_NUMBER:
24 The IP address of <ob> given as a string.
25
26 <what> == II_IP_PORT:
27 The client port number of <ob>.
28
29 <what> == II_IP_ADDRESS:
30 The full socket address structure given as an array of bytes.
31
32 For IPv4 (sockaddr_in):
33 array[0.. 1]: sin_family
34 array[2.. 3]: sin_port
35 array[4.. 7]: sin_addr
36 array[8..15]: undefined.
37
38 For IPv6 (sockaddr_in6):
39 array[ 0.. 1]: sin6_family
40 array[ 2.. 3]: sin6_port
41 array[ 4.. 7]: sin6_flowinfo
42 array[ 8..23]: sin6_addr
43 array[24..27]: sin6_scope_id
44
45 <what> == II_MUD_PORT:
46 The server port number that <ob> connected to.
47
48
49
50 Telnet Related Information:
51
52 <what> == II_MCCP_STATS:
53 Statistics about the current compression of <ob> given
54 as an array ({ uncompressed bytes, compressed bytes }).
55
56 If the connection is not compressed, 0 is returned.
57
58 Available only if the driver is compiled with MCCP enabled;
59 __MCCP__ is defined in that case.
60
61
62
63 Input Handling:
64
65 <what> == II_INPUT_PENDING:
66 If <ob> has an input_to() pending, the object that has called
67 the input_to() is returned, else 0.
68
69 <what> == II_EDITING:
70 If <ob> is currently editing with ed() and ed() was called with
71 an exit function, then the object that has called ed()
72 will be returned, 0 otherwise.
73
74 <what> == II_IDLE:
75 The number of seconds that the interactive object <ob> has been
76 idle.
77
Zesstra715ec202025-07-09 22:18:31 +020078 <what> == II_NOECHO:
79 The current no-echo mode of <ob>:
80 0: Normal echo mode
81 1: no-echo mode was requested (INPUT_NOECHO input is pending)
82 2: no-echo mode was acknowledged by the client (this does not
83 happen, if the mudlib handles this with the H_NOECHO hook).
84
85 <what> == II_CHARMODE:
86 Whether charmode is active for <ob>.
87 The values are similar to II_NOECHO.
88
MG Mud User88f12472016-06-24 23:31:02 +020089
90
91 Output Handling:
92
93 <what> == II_SNOOP_NEXT:
94 Returns the user who is currently snooping <ob>.
95 The calling object must be privileged by the master object
96 via valid_query_snoop().
97
98 <what> == II_SNOOP_PREV:
99 Returns the victim who is currently snooped by <ob>.
100 The calling object must be privileged by the master object
101 via valid_query_snoop().
102
103 <what> == II_SNOOP_ALL:
104 Returns all objects who are currently snooping <ob>.
105 Only one object can snoop <ob> directly, but that user might
106 be snooped, too, and so building a chain that is returned
107 as an array.
108
109 The calling object must be privileged by the master object
110 via valid_query_snoop().
111
112
113HISTORY
114 Introduced in LDMud 3.5.0.
115
116SEE ALSO
117 configure_interactive(E), object_info(E), driver_info(E)