<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://wiki.lostsouls.org/w/skins/common/feed.css"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.lostsouls.org/w/index.php?action=history&amp;feed=atom&amp;title=Man_hooks_%28concepts%29</id>
		<title>Man hooks (concepts) - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.lostsouls.org/w/index.php?action=history&amp;feed=atom&amp;title=Man_hooks_%28concepts%29"/>
		<link rel="alternate" type="text/html" href="http://wiki.lostsouls.org/w/index.php?title=Man_hooks_%28concepts%29&amp;action=history"/>
		<updated>2026-04-15T05:45:25Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.8.2</generator>

	<entry>
		<id>http://wiki.lostsouls.org/w/index.php?title=Man_hooks_%28concepts%29&amp;diff=26394&amp;oldid=prev</id>
		<title>Chaos: Man hooks(concepts) moved to Man hooks (concepts)</title>
		<link rel="alternate" type="text/html" href="http://wiki.lostsouls.org/w/index.php?title=Man_hooks_%28concepts%29&amp;diff=26394&amp;oldid=prev"/>
				<updated>2013-01-24T15:27:55Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;a href=&quot;/Man_hooks%28concepts%29&quot; title=&quot;Man hooks(concepts)&quot;&gt;Man hooks(concepts)&lt;/a&gt; moved to &lt;a href=&quot;/Man_hooks_%28concepts%29&quot; title=&quot;Man hooks (concepts)&quot;&gt;Man hooks (concepts)&lt;/a&gt;&lt;/p&gt;

			&lt;table border='0' width='98%' cellpadding='0' cellspacing='4' style=&quot;background-color: white;&quot;&gt;
			&lt;tr&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;Revision as of 15:27, 24 January 2013&lt;/td&gt;
			&lt;/tr&gt;
			
			&lt;/table&gt;
		</summary>
		<author><name>Chaos</name></author>	</entry>

	<entry>
		<id>http://wiki.lostsouls.org/w/index.php?title=Man_hooks_%28concepts%29&amp;diff=3989&amp;oldid=prev</id>
		<title>Laine at 22:00, 11 June 2007</title>
		<link rel="alternate" type="text/html" href="http://wiki.lostsouls.org/w/index.php?title=Man_hooks_%28concepts%29&amp;diff=3989&amp;oldid=prev"/>
				<updated>2007-06-11T22:00:29Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Description==&lt;br /&gt;
&lt;br /&gt;
To allow a greater flexibility of the muds, the gamedrivers&lt;br /&gt;
since 3.2.1 moved several once hardcoded 'underground'&lt;br /&gt;
activities from the driver into the mudlib. This includes for&lt;br /&gt;
example the differences between compat and native mode.&lt;br /&gt;
&lt;br /&gt;
The hooks are set with the privileged efun set_driver_hook().&lt;br /&gt;
Some of the hooks are mandatory, some not. Most hooks accept&lt;br /&gt;
unbound lambda closures as values, some also lfun closures or&lt;br /&gt;
even strings.&lt;br /&gt;
&lt;br /&gt;
The hooks are identified by an ordinal number, for which&lt;br /&gt;
symbolic names are defined in /sys/driverhooks.h.&lt;br /&gt;
&lt;br /&gt;
*H_MOVE_OBJECT0, H_MOVE_OBJECT1&lt;br /&gt;
&lt;br /&gt;
Mandatory hooks to implement the efun void move_object().&lt;br /&gt;
Hook setting must be an unbound lambda closure:&lt;br /&gt;
&lt;br /&gt;
  void &amp;lt;closure&amp;gt;(object item, object dest)&lt;br /&gt;
&lt;br /&gt;
Upon call, the hook has to perform the move itself (by using&lt;br /&gt;
set_environment()) and all depending actions (like the calls to&lt;br /&gt;
init() to add actions).&lt;br /&gt;
&lt;br /&gt;
The difference lies in the binding of the set hook prior to&lt;br /&gt;
the call: the H_MOVE_OBJECT0 closure is bound to the current&lt;br /&gt;
object, the H_MOVE_OBJECT1 to 'item'.  If both hooks are set, H_MOVE_OBJECT0 is ignored.&lt;br /&gt;
&lt;br /&gt;
*H_LOAD_UIDS, H_CLONE_UIDS&lt;br /&gt;
&lt;br /&gt;
Mandatory hooks to determine the uid and euid of loaded or cloned&lt;br /&gt;
objects.  Hook settings can be any closure:&lt;br /&gt;
&lt;br /&gt;
    mixed &amp;lt;load_uids closure&amp;gt; (string objectname)&lt;br /&gt;
    mixed &amp;lt;clone_uids closure&amp;gt;(object blueprint, string objectname)&lt;br /&gt;
&lt;br /&gt;
When an object is newly loaded, the H_LOAD_UIDS hook is&lt;br /&gt;
called with the object name as argument.  When an object is cloned, the H_CLONE_UIDS hook is called&lt;br /&gt;
with the blueprint object as first and the clone's designated name as second argument.&lt;br /&gt;
In both cases the new object already exists, but has 0 uids.&lt;br /&gt;
&lt;br /&gt;
For the result, the following possibilities exist (&amp;lt;num&amp;gt; is&lt;br /&gt;
a non-zero number, &amp;lt;no-string&amp;gt; is anything but a string):&lt;br /&gt;
&lt;br /&gt;
   &amp;quot;&amp;lt;uid&amp;gt;&amp;quot;                    -&amp;gt; uid = &amp;quot;&amp;lt;uid&amp;gt;&amp;quot;, euid = &amp;quot;&amp;lt;uid&amp;gt;&amp;quot;&lt;br /&gt;
   ({ &amp;quot;&amp;lt;uid&amp;gt;&amp;quot;, &amp;quot;&amp;lt;euid&amp;gt;&amp;quot; })    -&amp;gt; uid = &amp;quot;&amp;lt;uid&amp;gt;&amp;quot;, euid = &amp;quot;&amp;lt;euid&amp;gt;&amp;quot;&lt;br /&gt;
   ({ &amp;quot;&amp;lt;uid&amp;gt;&amp;quot;, &amp;lt;no-string&amp;gt; }) -&amp;gt; uid = &amp;quot;&amp;lt;uid&amp;gt;&amp;quot;, euid = 0&lt;br /&gt;
&lt;br /&gt;
If strict-euids is not active, the following results are&lt;br /&gt;
possible, too:&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;num&amp;gt;                      -&amp;gt; uid = 0, euid = 0&lt;br /&gt;
   ({ &amp;lt;num&amp;gt;, &amp;quot;&amp;lt;euid&amp;gt;&amp;quot; })      -&amp;gt; uid = 0, euid = &amp;quot;&amp;lt;euid&amp;gt;&amp;quot;&lt;br /&gt;
   ({ &amp;lt;num&amp;gt;, &amp;lt;no-string&amp;gt; })   -&amp;gt; uid = 0, euid = 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*H_CREATE_SUPER, H_CREATE_OB, H_CREATE_CLONE&lt;br /&gt;
&lt;br /&gt;
Optional hooks to initialize an object after creation.  Hook setting can be unbound lambda closures, or the name of the function to call in the object.&lt;br /&gt;
&lt;br /&gt;
H_CREATE_SUPER is called for blueprints implicitely loaded by inheritance, H_CREATE_OB for explicitely loaded blueprints/objects, and H_CREATE_CLONE for cloned objects.&lt;br /&gt;
&lt;br /&gt;
If the hook is a closure expecting an argument, it is bound to the current object and called as&lt;br /&gt;
&lt;br /&gt;
  int &amp;lt;closure&amp;gt; (object obj_to_init)&lt;br /&gt;
&lt;br /&gt;
If the hook as a closure without arguments, it is bound to&lt;br /&gt;
the object to be initalized and called as&lt;br /&gt;
&lt;br /&gt;
  int &amp;lt;closure&amp;gt; ( void )&lt;br /&gt;
&lt;br /&gt;
If the result of the call is a non-zero number, it is used as the interval to wait before the first reset(), else the default interval computed from TIME_TO_RESET is used.&lt;br /&gt;
&lt;br /&gt;
If the hook is defined as the name of an lfun (static or public)&lt;br /&gt;
in the object, it is called in the object as&lt;br /&gt;
&lt;br /&gt;
  void &amp;lt;name&amp;gt;(0)&lt;br /&gt;
&lt;br /&gt;
and any result is ignored.  In this call the previous_object() is the object initiating the load.&lt;br /&gt;
&lt;br /&gt;
*H_RESET&lt;br /&gt;
&lt;br /&gt;
Optional hook to reset an object.  Hook setting can be unbound lambda closures, or the name of&lt;br /&gt;
the function to call in the object.&lt;br /&gt;
&lt;br /&gt;
This hook is called to reset the object after a certain time since its creation/last reset.&lt;br /&gt;
&lt;br /&gt;
If the hook is a closure, it is bound to the object to be reset and called with no argument:&lt;br /&gt;
&lt;br /&gt;
  void|int &amp;lt;closure&amp;gt; ( void )&lt;br /&gt;
&lt;br /&gt;
If the result of the call is a positive number, it is used as the interval to wait before the next reset().  If the result is 0, the default interval computed from&lt;br /&gt;
TIME_TO_RESET is used.  If the result is a negative number, the object will not be&lt;br /&gt;
reset again, unless directed otherwise by set_next_reset().&lt;br /&gt;
&lt;br /&gt;
If the hook is defined as the name of an lfun (static or public) in the object, it is called in the object as&lt;br /&gt;
&lt;br /&gt;
  void &amp;lt;name&amp;gt;(1)&lt;br /&gt;
&lt;br /&gt;
and any result is ignored.  In this call the previous_object() is the object initiating&lt;br /&gt;
the reset.  If the function does not exist, the object won't be reset again.&lt;br /&gt;
&lt;br /&gt;
*H_CLEAN_UP&lt;br /&gt;
Optional hook to clean up an object.  Hook setting can be any closure, or the name of the function&lt;br /&gt;
to call in the object.&lt;br /&gt;
&lt;br /&gt;
This hook is called for an object if it hasn't been used for at least TIME_TO_CLEAN_UP seconds, to give it the opportunity to self destruct.&lt;br /&gt;
&lt;br /&gt;
If the hook is a closure, it is called as&lt;br /&gt;
&lt;br /&gt;
  int &amp;lt;closure&amp;gt;(int ref, object ob)&lt;br /&gt;
&lt;br /&gt;
with the object's refcount as first argument, and object itself as&lt;br /&gt;
second. Lambda closures are also bound to the object prior to the&lt;br /&gt;
call.&lt;br /&gt;
&lt;br /&gt;
If the hook is the name of an lfun, it is called in the&lt;br /&gt;
object with its refcount as argument:&lt;br /&gt;
&lt;br /&gt;
  void|int &amp;lt;name&amp;gt;(int ref)&lt;br /&gt;
&lt;br /&gt;
In both calls, the refcount is constructed as:&lt;br /&gt;
&lt;br /&gt;
  ref = 0: the object is a clone, or a blueprint with&lt;br /&gt;
           replaced program.&lt;br /&gt;
  ref = 1: the object is a swapped or unused blueprint.&lt;br /&gt;
  ref &amp;gt; 1: the object is a used blueprint with &amp;lt;ref&amp;gt; references.&lt;br /&gt;
&lt;br /&gt;
The cleanup method has the possibility to destruct the&lt;br /&gt;
object. To survive this time, but try again some time later,&lt;br /&gt;
the call has to result in a non-zero value.&lt;br /&gt;
&lt;br /&gt;
If the hook specifies a non-existing lfun, or if the call&lt;br /&gt;
returns 0, no further attempt to clean up this object will be done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*H_COMMAND&lt;br /&gt;
&lt;br /&gt;
Optional hook to parse and execute commands. If this hook is used,&lt;br /&gt;
it bypasses the normal command parsing done by the driver (including&lt;br /&gt;
the MODIFY_COMMAND and NOTIFY_FAIL hooks).&lt;br /&gt;
&lt;br /&gt;
The hook is called with two parameters: the command received&lt;br /&gt;
from the living (interactive user or NPC), and the living object&lt;br /&gt;
(the 'command giver') itself. The hook has to return non-0 if the&lt;br /&gt;
command was found and executed, and 0 otherwise.&lt;br /&gt;
&lt;br /&gt;
At the time the hook is called, query_command() returns the command&lt;br /&gt;
string and this_player() returns the living object. query_verb() and&lt;br /&gt;
query_notify_fail() return 0.&lt;br /&gt;
&lt;br /&gt;
If the hook is a string, it is the name of an lfun in the command&lt;br /&gt;
giver:&lt;br /&gt;
&lt;br /&gt;
    int &amp;lt;name&amp;gt;(string command, object command_giver)&lt;br /&gt;
&lt;br /&gt;
If the hook is a closure, it is called as:&lt;br /&gt;
&lt;br /&gt;
    int &amp;lt;closure&amp;gt;(string command, object command_giver)&lt;br /&gt;
&lt;br /&gt;
Lambda-closures are additionally bound to the command_giver.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*H_MODIFY_COMMAND&lt;br /&gt;
Optional hook to modify commands (both entered or given by a&lt;br /&gt;
call to command()) before the parser sees them (this includes&lt;br /&gt;
special commands like 'status').&lt;br /&gt;
&lt;br /&gt;
Hook setting can be any closure, the name of the function&lt;br /&gt;
to call in the object, or a mapping.&lt;br /&gt;
&lt;br /&gt;
For interactives this hook is used only if the interactive&lt;br /&gt;
object has no command modifier already set by the efun&lt;br /&gt;
set_modify_command().&lt;br /&gt;
&lt;br /&gt;
If the hook is a closure, it is called as&lt;br /&gt;
&lt;br /&gt;
  int|string &amp;lt;closure&amp;gt;(string cmd, object player)&lt;br /&gt;
&lt;br /&gt;
with the entered command as first, and the command giving&lt;br /&gt;
player as second argument.&lt;br /&gt;
&lt;br /&gt;
If the hook is a string, it is used as the name of an lfun&lt;br /&gt;
in the command giving player, which is called as&lt;br /&gt;
&lt;br /&gt;
  int|string &amp;lt;name&amp;gt;(string cmd)&lt;br /&gt;
&lt;br /&gt;
If the hook is a mapping, it is queried with the given&lt;br /&gt;
command as index, and the data retrieved is used (defaults&lt;br /&gt;
to 0 if no data is stored for a given command). If an entry&lt;br /&gt;
is a closure, it is called as&lt;br /&gt;
&lt;br /&gt;
  int|string &amp;lt;closure&amp;gt;(string cmd, object player)&lt;br /&gt;
&lt;br /&gt;
and the result from the call is used as 'the' result.&lt;br /&gt;
&lt;br /&gt;
The result is treated equal in all three cases.&lt;br /&gt;
If the result is a string, it is the new command to execute&lt;br /&gt;
instead of the given one. Note that it is not possible to&lt;br /&gt;
make several commands from one this way!&lt;br /&gt;
If the result is a non-zero number, the given command is to&lt;br /&gt;
be ignored. In case of the closure/lfun setting this may&lt;br /&gt;
mean that the closure/lfun already executed it.&lt;br /&gt;
If the result is 0, the originally given command is to be&lt;br /&gt;
used.&lt;br /&gt;
&lt;br /&gt;
It is possible for the hook to change the command giver&lt;br /&gt;
(this_player()) for the execution of the command. This means that&lt;br /&gt;
even though the commands are execute for the original commandgiver,&lt;br /&gt;
this_player() will return the changed commandgiver.&lt;br /&gt;
&lt;br /&gt;
*H_MODIFY_COMMAND_FNAME&lt;br /&gt;
Mandatory hook specifying the name of the 'modify_command'&lt;br /&gt;
function to call for newly entered commands as result of a&lt;br /&gt;
set_modify_command().&lt;br /&gt;
&lt;br /&gt;
Hook setting must be a string.&lt;br /&gt;
&lt;br /&gt;
If set_modify_command() is used for an interactive user, all&lt;br /&gt;
newly entered commands are first passed to the function&lt;br /&gt;
named by this hook.&lt;br /&gt;
&lt;br /&gt;
The function is called as&lt;br /&gt;
&lt;br /&gt;
  int|string &amp;lt;name&amp;gt;(string cmd)&lt;br /&gt;
&lt;br /&gt;
If the result is a string, it is the new command to execute&lt;br /&gt;
instead of the given one. Note that it is not possible to&lt;br /&gt;
make several commands from one this way!&lt;br /&gt;
If the result is a non-zero number, the given command is to&lt;br /&gt;
be ignored. In case of the closure/lfun setting this may&lt;br /&gt;
mean that the closure/lfun already executed it.&lt;br /&gt;
If the result is 0, the originally given command is to be&lt;br /&gt;
used.&lt;br /&gt;
&lt;br /&gt;
It is possible for the hook to change the command giver&lt;br /&gt;
(this_player()) for the execution of the command. This means that&lt;br /&gt;
even though the commands are execute for the original commandgiver,&lt;br /&gt;
this_player() will return the changed commandgiver.&lt;br /&gt;
&lt;br /&gt;
*H_NOTIFY_FAIL&lt;br /&gt;
&lt;br /&gt;
Mandatory hook to issue the default message if an entered&lt;br /&gt;
command couldn't be parsed and no notify_fail() command is&lt;br /&gt;
in effect.&lt;br /&gt;
Hook setting can be a any closure, or a string.&lt;br /&gt;
&lt;br /&gt;
If set to a string, it is the message returned to the&lt;br /&gt;
player.&lt;br /&gt;
If set to a closure, it is called as&lt;br /&gt;
&lt;br /&gt;
  string &amp;lt;closure&amp;gt;(string entered_command, object cmd_giver)&lt;br /&gt;
&lt;br /&gt;
and the result is used as failure message. Lambda closures&lt;br /&gt;
are bound to this_player() prior to execution.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cmd_giver&amp;gt; is the object which received the command in&lt;br /&gt;
the first place. It is usually identical with this_player(),&lt;br /&gt;
unless the H_MODIFY_COMMAND hook changed it.&lt;br /&gt;
&lt;br /&gt;
*H_SEND_NOTIFY_FAIL&lt;br /&gt;
&lt;br /&gt;
Optional hook to send the notify fail message, regardless&lt;br /&gt;
of how it was determined, to the player. If the hook is not&lt;br /&gt;
set, the message is delivered using tell_object() internally.&lt;br /&gt;
Hook setting can be a string or a closure.&lt;br /&gt;
&lt;br /&gt;
If the hook is a string, it is the name of a (possibly static)&lt;br /&gt;
function to call in the current command giver. If the hook&lt;br /&gt;
is a closure, it is the function to be called. Lambda closures&lt;br /&gt;
are bound to the current command giver first.&lt;br /&gt;
&lt;br /&gt;
The function is called as&lt;br /&gt;
&lt;br /&gt;
  void &amp;lt;function&amp;gt;(string msg, object msgobj, object orig_cmd_giver)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;msg&amp;gt; is the notify fail message to be delivered.&lt;br /&gt;
&amp;lt;msgobj&amp;gt; is the object which set the message. It is 0 for the&lt;br /&gt;
default message.&lt;br /&gt;
&amp;lt;orig_cmd_giver&amp;gt; is the object for which the original command&lt;br /&gt;
was first received. It is usually identical with the current&lt;br /&gt;
command giver this_player().&lt;br /&gt;
&lt;br /&gt;
*H_NO_IPC_SLOT&lt;br /&gt;
&lt;br /&gt;
Optional hook specifying the message given to logins&lt;br /&gt;
rejected due to space limitations (MAX_PLAYER).&lt;br /&gt;
Hook setting has to be string.&lt;br /&gt;
If set to 0, the default message &amp;quot;Lpmud is full. Come back&lt;br /&gt;
later.&amp;quot; is issued.&lt;br /&gt;
&lt;br /&gt;
*H_INCLUDE_DIRS&lt;br /&gt;
&lt;br /&gt;
Semi-mandatory hook specifying the directories where &amp;lt;&amp;gt;-type&lt;br /&gt;
include files are searched (this includes &amp;quot;&amp;quot;-includes not&lt;br /&gt;
found as specified).  Hook setting may be any closure or a string array.&lt;br /&gt;
If not set, only &amp;quot;&amp;quot;-type includes may be used in LPC&lt;br /&gt;
programs.&lt;br /&gt;
&lt;br /&gt;
The hook is called only if a call to master::include_file()&lt;br /&gt;
does not return a usable filename.&lt;br /&gt;
&lt;br /&gt;
If the hook setting is a string array, it has to contain the&lt;br /&gt;
path names of those directories where &amp;lt;&amp;gt;-type includes are&lt;br /&gt;
to be searched. The directories are searched in the order&lt;br /&gt;
they appear in the array. The directory name and the name of&lt;br /&gt;
the actual include file are concatenated, therefore the&lt;br /&gt;
directory names have to end in '/'. Leading slashes may be&lt;br /&gt;
omitted.&lt;br /&gt;
&lt;br /&gt;
If the setting is a closure, it is called as&lt;br /&gt;
&lt;br /&gt;
  string &amp;lt;closure&amp;gt;(string include_name, string current_file)&lt;br /&gt;
&lt;br /&gt;
with the name of the desired include file as first, and the&lt;br /&gt;
name of the compiled LPC file as second argument.&lt;br /&gt;
Result has to be the complete path name of the include file&lt;br /&gt;
to use (leading slashes may be omitted).&lt;br /&gt;
If the closure is a lambda closure, it is bound to&lt;br /&gt;
this_object() prior to execution.&lt;br /&gt;
&lt;br /&gt;
*H_AUTO_INCLUDE&lt;br /&gt;
&lt;br /&gt;
Optional hook specifying a string to be included before&lt;br /&gt;
the source of every compiled LPC object.&lt;br /&gt;
Hook setting can be a string or a closure.&lt;br /&gt;
&lt;br /&gt;
If the setting is a string, it will be automatically included before&lt;br /&gt;
the source of every compiled LPC object.&lt;br /&gt;
&lt;br /&gt;
If the setting is a closure, it is called as&lt;br /&gt;
&lt;br /&gt;
  string &amp;lt;closure&amp;gt;(string base_file, string current_file&lt;br /&gt;
                  , int sys_include)&lt;br /&gt;
&lt;br /&gt;
for every file opened by the compiler. &amp;lt;base_file&amp;gt; will be the&lt;br /&gt;
filename of the compiled object, &amp;lt;current_file&amp;gt; the name of a file&lt;br /&gt;
included directly or indirectly by the &amp;lt;base_file&amp;gt;. When the&lt;br /&gt;
&amp;lt;base_file&amp;gt; itself is opened, &amp;lt;current_file&amp;gt; will be 0. For an&lt;br /&gt;
included file, &amp;lt;sys_include&amp;gt; will be TRUE if it is a &amp;lt;&amp;gt;-type&lt;br /&gt;
include.&lt;br /&gt;
&lt;br /&gt;
If the result is a string, it will be included before the actual&lt;br /&gt;
text of the file.&lt;br /&gt;
&lt;br /&gt;
*H_TELNET_NEG&lt;br /&gt;
&lt;br /&gt;
Optional hook to specifiy how to perform a single telnet&lt;br /&gt;
negotiation.  Hook setting may be any closure or a string.&lt;br /&gt;
If not set, most telnet options are rejected (read: only a&lt;br /&gt;
very minimal negotiation takes place).&lt;br /&gt;
&lt;br /&gt;
The hook is called whenever the driver receives a demand for&lt;br /&gt;
option negotiation for:&lt;br /&gt;
&lt;br /&gt;
  SB:               Suboption negotiation&lt;br /&gt;
  TELOPT_LINEMODE:  linemode&lt;br /&gt;
  TELOPT_NAWS:      window size&lt;br /&gt;
  TELOPT_TTYPE:     terminal type&lt;br /&gt;
  TELOPT_TM:        timing mark&lt;br /&gt;
  TELOPT_NEWENV:    remote environment variables&lt;br /&gt;
  TELOPT_ENVIRON:   remote environment variables&lt;br /&gt;
  TELOPT_XDISPLOC:  remote X display address&lt;br /&gt;
  TELOPT_TSPEED:    terminal speed&lt;br /&gt;
  TELOPT_BINARY:    binary data, needed for non-ASCII charsets&lt;br /&gt;
  TELOPT_EOR:       TinyFugue prompt marker (together with EOR)&lt;br /&gt;
&lt;br /&gt;
  TELOPT_COMPRESS:  Mud Compression Protocol&lt;br /&gt;
  TELOPT_COMPRESS2: Mud Compression Protocol&lt;br /&gt;
  TELOPT_MSP:       Mud Sound Protocol&lt;br /&gt;
  TELOPT_MXP:       Mud Extension Protocol&lt;br /&gt;
&lt;br /&gt;
The hook has then to perform the negotiation using the efun&lt;br /&gt;
binary_message().&lt;br /&gt;
&lt;br /&gt;
Alternatively, if H_NOECHO is set, this hook is called&lt;br /&gt;
for all telnet data received.&lt;br /&gt;
&lt;br /&gt;
If the setting is a string, it used as name of an lfun to&lt;br /&gt;
call in this_player():&lt;br /&gt;
&lt;br /&gt;
  void|mixed &amp;lt;name&amp;gt;(int action, int option [, int * opts ] )&lt;br /&gt;
&lt;br /&gt;
Similar, if the setting is a closure, it is called as:&lt;br /&gt;
&lt;br /&gt;
  void|mixed &amp;lt;closure&amp;gt;(int action, int option [, int * opts ] )&lt;br /&gt;
&lt;br /&gt;
with unbound lambda-closures being bound to this_player()&lt;br /&gt;
prior to execution.&lt;br /&gt;
&lt;br /&gt;
The hook is called for a 'DO/DONT/WILL/WONT &amp;lt;opt&amp;gt;' with the action&lt;br /&gt;
(DO/DONT/...) as the first, and &amp;lt;opt&amp;gt; as the second argument.&lt;br /&gt;
&lt;br /&gt;
If the driver receives the sequence&lt;br /&gt;
&lt;br /&gt;
  IAC SB &amp;lt;opt&amp;gt; &amp;lt;opts&amp;gt;...&lt;br /&gt;
&lt;br /&gt;
followed by IAC SB/SE,  the hook is called with 'SB' as first&lt;br /&gt;
argument, &amp;lt;opt&amp;gt; as second, and &amp;lt;opts&amp;gt; as an array of integers as&lt;br /&gt;
third argument.&lt;br /&gt;
&lt;br /&gt;
*H_NOECHO&lt;br /&gt;
&lt;br /&gt;
Optional hook to specifiy how to perform the telnet actions&lt;br /&gt;
to switch the echo mode (used for e.g. password input_to()s).&lt;br /&gt;
Hook setting may be any closure or a string.&lt;br /&gt;
If not set, a default handling is performed.&lt;br /&gt;
&lt;br /&gt;
If the setting is a string, it used as name of an lfun to&lt;br /&gt;
call in the intercative &amp;lt;user&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
  void &amp;lt;name&amp;gt;(int flag, object user, int no_telnet)&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;flag&amp;gt; is the echo-flag passed to the input_to()&lt;br /&gt;
statement.  Similar, if the setting is a closure, it is called as:&lt;br /&gt;
&lt;br /&gt;
  void &amp;lt;closure&amp;gt;(int flag, object user, int no_telnet)&lt;br /&gt;
&lt;br /&gt;
with unbound lambda-closures being bound to this_player()&lt;br /&gt;
prior to execution.&lt;br /&gt;
&lt;br /&gt;
When set, the hook is called whenever the driver needs to&lt;br /&gt;
change the echo mode, thus you can negotiate about things&lt;br /&gt;
that are coupled with it, like LINEMODE or&lt;br /&gt;
character-at-a-time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;local&amp;gt; is a boolean flag: it is TRUE when input_to() was&lt;br /&gt;
called with the INPUT_NO_TELNET flag.&lt;br /&gt;
&lt;br /&gt;
IMPORTANT: If this hook is used, the control of all telnet&lt;br /&gt;
negotiation is transferred to the mudlib: all incoming negotiations&lt;br /&gt;
are passed to H_TELNET_NEG, and the sending of no-echo negotiations&lt;br /&gt;
is handled by this hook.&lt;br /&gt;
&lt;br /&gt;
*H_ERQ_STOP&lt;br /&gt;
&lt;br /&gt;
Optional hook to notify the mudlib about the termination of&lt;br /&gt;
the erq demon.  Hook setting may be any closure.&lt;br /&gt;
&lt;br /&gt;
The closure is called without arguments:&lt;br /&gt;
&lt;br /&gt;
  void &amp;lt;closure&amp;gt;()&lt;br /&gt;
&lt;br /&gt;
and may do whatever it likes to clean-up after the erq.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
H_NOTIFY_FAIL recevied the new 'command_giver' argument in 3.2.7.&lt;br /&gt;
The hooks concept was introduced in 3.2.1&lt;br /&gt;
The hook for moving was introduced in 3.2.1@1&lt;br /&gt;
The hook for clean up was introduced in 3.2.1@34&lt;br /&gt;
The hook for modifying commands was introduced in 3.2.1@51,&lt;br /&gt;
the evaluation of mapping as hooks was extended in 3.2.1@54.&lt;br /&gt;
The lfun called as result of set_modify_command() was&lt;br /&gt;
'hooked' in 3.2.1@109.&lt;br /&gt;
The hooks for notify_fail and full muds were introduced in 3.2.1@55.&lt;br /&gt;
The hook for include dirs was introduced in 3.2.1@57.&lt;br /&gt;
The hook for telnet negotiation was introduced in 3.2.1@60.&lt;br /&gt;
The hooks for no-echo negotiation and erq-lossage notification&lt;br /&gt;
were introduced in 3.2.1@85.&lt;br /&gt;
H_COMMAND was introduced in 3.2.7.&lt;br /&gt;
H_SEND_NOTIFY_FAIL and H_AUTO_INCLUDE were introduced in 3.2.9.&lt;br /&gt;
LDMud 3.2.10 allowed static functions to be specified by name&lt;br /&gt;
for H_RESET and H_CREATE_* &lt;br /&gt;
LDMud 3.2.11 added the &amp;lt;no_telnet&amp;gt; argument to H_NOECHO.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
[[man native|native(C)]], [[man set driver hook|set_driver_hook(E)]]&lt;/div&gt;</summary>
		<author><name>Laine</name></author>	</entry>

	</feed>