Added public files

Roughly added all public files. Probably missed some, though.
diff --git a/doc/hook/auto_include b/doc/hook/auto_include
new file mode 100644
index 0000000..a82adda
--- /dev/null
+++ b/doc/hook/auto_include
@@ -0,0 +1,37 @@
+SYNOPSIS
+        #include <sys/driver_hooks.h>
+
+        set_driver_hook(H_AUTO_INCLUDE, value)
+
+        <value> being:
+
+          string <text>
+          string <closure>(string base_file, string current_file
+                          , int sys_include)
+
+DESCRIPTION
+        Optional hook specifying a string to be included before
+        the source of every compiled LPC object.
+        Hook setting can be a string or a closure.
+
+        If the setting is a string, it will be automatically included before
+        the source of every compiled LPC object.
+
+        If the setting is a closure, it is called for every file
+        opened by the compiler. <base_file> will be the filename of
+        the compiled object, <current_file> the name of a file
+        included directly or indirectly by the <base_file>. When the
+        <base_file> itself is opened, <current_file> will be 0. For an
+        included file, <sys_include> will be TRUE if it is a <>-type
+        include.
+
+        If the result from the call is a string, it will be included
+        before the actual text of the file.
+
+        In both cases, the string will be included as-is; in
+        particular no terminating '\n' will be added.
+
+HISTORY
+
+SEE ALSO
+        hooks(C), include_dirs(H)
diff --git a/doc/hook/clean_up b/doc/hook/clean_up
new file mode 100644
index 0000000..e00521a
--- /dev/null
+++ b/doc/hook/clean_up
@@ -0,0 +1,45 @@
+SYNOPSIS
+        #include <sys/driver_hooks.h>
+
+        set_driver_hook(H_CLEAN_UP, value)
+
+        <value> being:
+
+          int <closure>(int ref, object ob)
+          void|int <name>(int ref)
+
+DESCRIPTION
+        Optional hook to clean up an object.
+        Hook setting can be any closure, or the name of the function
+        to call in the object.
+
+        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.
+
+        If the hook is a closure, it is called with the refcount of
+        the object to clean up as first argument, and with the object
+        itself as second. Lambda closures are also bound to the object
+        prior to the call.
+
+        If the hook is the name of an lfun, it is called in the
+        object with its refcount as argument.
+
+        In both calls, the refcount is constructed as:
+
+          ref = 0: the object is a clone, or a blueprint with
+                   replaced program.
+          ref = 1: the object is a swapped or unused blueprint.
+          ref > 1: the object is a used blueprint with <ref> references.
+
+        The cleanup method has the possibility to destruct the
+        object. To survive this time, but try again some time later,
+        the call has to result in a non-zero value.
+
+        If the hook specifies a non-existing lfun, or if the call
+        returns 0, no further attempt to clean up this object will be done.
+
+HISTORY
+
+SEE ALSO
+        hooks(C)
diff --git a/doc/hook/clone_uids b/doc/hook/clone_uids
new file mode 100644
index 0000000..4bf902a
--- /dev/null
+++ b/doc/hook/clone_uids
@@ -0,0 +1,36 @@
+SYNOPSIS
+        #include <sys/driver_hooks.h>
+
+        set_driver_hook(H_CLONE_UIDS, value)
+
+        <value> being:
+
+          mixed <closure>(object blueprint, string objectname)
+
+DESCRIPTION
+        Mandatory hooks to determine the uid and euid of cloned
+        objects.  Hook settings can be any closure.
+
+        When an object is cloned, the H_CLONE_UIDS hook is called with
+        the blueprint object as first and the clone's designated name
+        as second argument. The new object already exists, but has 0
+        uids.
+
+        For the result, the following possibilities exist (<num> is
+        a non-zero number, <no-string> is anything but a string):
+
+           "<uid>"                    -> uid = "<uid>", euid = "<uid>"
+           ({ "<uid>", "<euid>" })    -> uid = "<uid>", euid = "<euid>"
+           ({ "<uid>", <no-string> }) -> uid = "<uid>", euid = 0
+
+        If strict-euids is not active, the following results are
+        possible, too:
+
+           <num>                      -> uid = 0, euid = 0
+           ({ <num>, "<euid>" })      -> uid = 0, euid = "<euid>"
+           ({ <num>, <no-string> })   -> uid = 0, euid = 0
+
+HISTORY
+
+SEE ALSO
+        hooks(C), uids(C), load_uids(H)
diff --git a/doc/hook/command b/doc/hook/command
new file mode 100644
index 0000000..de1b609
--- /dev/null
+++ b/doc/hook/command
@@ -0,0 +1,33 @@
+SYNOPSIS
+        #include <sys/driver_hooks.h>
+
+        set_driver_hook(H_COMMAND, value)
+
+        <value> being:
+
+          int <closure>(string command, object command_giver)
+          int <name>(string command, object command_giver)
+
+DESCRIPTION
+        Optional hook to parse and execute commands. If this hook is
+        used, it bypasses the normal command parsing done by the
+        driver (including the MODIFY_COMMAND and NOTIFY_FAIL hooks).
+
+        The hook is called with two parameters: the command received
+        from the living (interactive user or NPC), and the living
+        object (the 'command giver') itself. The hook has to return
+        non-0 if the command was found and executed, and 0 otherwise.
+
+        At the time the hook is called, query_command() returns the
+        command string and this_player() returns the living object.
+        query_verb() and query_notify_fail() return 0.
+
+        If the hook is a string, it is the name of an lfun in the
+        command giver; if the hook is a lambda closure, it is bound to
+        the command giver before the call.
+
+HISTORY
+
+SEE ALSO
+        hooks(C), modify_command(H), modify_command_fname(H), notify_fail(H),
+        send_notify_fail(H)
diff --git a/doc/hook/create_clone b/doc/hook/create_clone
new file mode 100644
index 0000000..bf3100e
--- /dev/null
+++ b/doc/hook/create_clone
@@ -0,0 +1,34 @@
+SYNOPSIS
+        #include <sys/driver_hooks.h>
+
+        set_driver_hook(H_CREATE_CLONE, value)
+
+        <value> being:
+
+          void <name> (0)
+          int <closure> ( void )
+          int <closure> (object obj_to_init)
+
+DESCRIPTION
+        Optional hooks to initialize a cloned object after creation.
+        Hook setting can be unbound lambda closures, or the name of
+        the function (static or public) to call in the object.
+
+        If the hook is a closure expecting an argument, it is bound
+        to the current object and called with the created object as
+        argument. If the hook as a closure without arguments, it is bound to
+        the object to be initalized and called.
+
+        If the result of the closure 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.
+
+        If the hook is defined as the name of an lfun in the object,
+        it is called in the object with 0 as argument, and any result
+        is ignored.
+
+HISTORY
+        LDMud 3.2.10 allowed static functions to be given by name.
+
+SEE ALSO
+        hooks(C), create_ob(H), create_super(H)
diff --git a/doc/hook/create_ob b/doc/hook/create_ob
new file mode 100644
index 0000000..7de7ba3
--- /dev/null
+++ b/doc/hook/create_ob
@@ -0,0 +1,35 @@
+SYNOPSIS
+        #include <sys/driver_hooks.h>
+
+        set_driver_hook(H_CREATE_OB, value)
+
+        <value> being:
+
+          void <name> (0)
+          int <closure> ( void )
+          int <closure> (object obj_to_init)
+
+DESCRIPTION
+        Optional hooks to initialize an explictely loaded
+        object/blueprint after creation.  Hook setting can be unbound
+        lambda closures, or the name of the function (static or public) to
+        call in the object.
+
+        If the hook is a closure expecting an argument, it is bound
+        to the current object and called with the created object as
+        argument. If the hook as a closure without arguments, it is bound to
+        the object to be initalized and called.
+
+        If the result of the closure 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.
+
+        If the hook is defined as the name of an lfun in the object,
+        it is called in the object with 0 as argument, and any result
+        is ignored.
+
+HISTORY
+        LDMud 3.2.10 allowed static functions to be given by name.
+
+SEE ALSO
+        hooks(C), create_super(H), create_clone(H)
diff --git a/doc/hook/create_super b/doc/hook/create_super
new file mode 100644
index 0000000..a502730
--- /dev/null
+++ b/doc/hook/create_super
@@ -0,0 +1,35 @@
+SYNOPSIS
+        #include <sys/driver_hooks.h>
+
+        set_driver_hook(H_CREATE_SUPER, value)
+
+        <value> being:
+
+          void <name> (0)
+          int <closure> ( void )
+          int <closure> (object obj_to_init)
+
+DESCRIPTION
+        Optional hooks to initialize a blueprint which is loaded by
+        inheritance after creation.
+        Hook setting can be unbound lambda closures, or the name of
+        the function (static or public) to call in the object.
+
+        If the hook is a closure expecting an argument, it is bound
+        to the current object and called with the created object as
+        argument. If the hook as a closure without arguments, it is bound to
+        the object to be initalized and called.
+
+        If the result of the closure 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.
+
+        If the hook is defined as the name of an lfun in the object,
+        it is called in the object with 0 as argument, and any result
+        is ignored.
+
+HISTORY
+        LDMud 3.2.10 allowed static functions to be given by name.
+
+SEE ALSO
+        hooks(C), create_ob(H), create_clone(H)
diff --git a/doc/hook/default_method b/doc/hook/default_method
new file mode 100644
index 0000000..427a131
--- /dev/null
+++ b/doc/hook/default_method
@@ -0,0 +1,44 @@
+SYNOPSIS
+        #include <sys/driver_hooks.h>
+
+        set_driver_hook(H_DEFAULT_METHOD, value)
+
+        <value> being:
+
+          int <name>(mixed & result, string fun, varargs args)
+          int <closure>(mixed & result, object ob, string fun, varargs args)
+
+DESCRIPTION
+        Optional hook to provide default implementation for unresolved
+        calls. Hook setting can be any closure, or the name of the
+        function to call in the object.
+
+        This hook is called whenever a call_other(), call_resolved()
+        or call_out() on named function (as opposed to a closure)
+        couldn't be resolved. The hook has then the opportunity to
+        provide a default implementation.
+
+        Exempt from this behaviour are calls to the master object, to
+        simul-efuns, and calls done with call_direct() and
+        call_direct_resolved().
+
+        If the hook is the name of an lfun, it is called in the target
+        object; otherwise if it is a closure, the target object is
+        passed as parameter <ob>.
+
+        The other parameters passed are the name <fun> of the called
+        function, the arguments <args> passed to the call (if any),
+        and a reference <result> to a variable for the call result.
+
+        If the hook can resolve the call, it has to return the call
+        result in <result> and 1 as function result.
+
+        If the hook can not (or doesn't want to) resolve the call, it
+        has to return 0.
+
+
+HISTORY
+        Introduced in LDMud 3.3.113
+
+SEE ALSO
+        hooks(C)
diff --git a/doc/hook/default_prompt b/doc/hook/default_prompt
new file mode 100644
index 0000000..6231bb4
--- /dev/null
+++ b/doc/hook/default_prompt
@@ -0,0 +1,24 @@
+SYNOPSIS
+        #include <sys/driver_hooks.h>
+
+        set_driver_hook(H_DEFAULT_PROMPT, value)
+
+        <value> being:
+
+          string <prompt>
+          string <closure>()
+
+DESCRIPTION
+        Optional hook for the command prompt. If this hook is not used,
+        the driver will use "> " as the command prompt.
+
+        The hook can be given as string or as closure. If it is a
+        closure, it is called with the commandgiver being the calling
+        object. If the result is a string, it will be printed,
+        otherwise ignored.
+
+HISTORY
+        Introduced in LDMud 3.3.163.
+
+SEE ALSO
+        hooks(C), print_prompt(H)
diff --git a/doc/hook/erq_stop b/doc/hook/erq_stop
new file mode 100644
index 0000000..a135a1c
--- /dev/null
+++ b/doc/hook/erq_stop
@@ -0,0 +1,20 @@
+SYNOPSIS
+        #include <sys/driver_hooks.h>
+
+        set_driver_hook(H_ERQ_STOP, value)
+
+        <value> being:
+
+          void <closure>()
+
+DESCRIPTION
+        Optional hook to notify the mudlib about the termination of
+        the erq demon.  Hook setting may be any closure.
+
+        The closure is called without arguments and may do whatever it
+        likes to clean-up after the erq.
+
+HISTORY
+
+SEE ALSO
+        hooks(C)
diff --git a/doc/hook/hook b/doc/hook/hook
new file mode 100644
index 0000000..3218445
--- /dev/null
+++ b/doc/hook/hook
@@ -0,0 +1,18 @@
+CONCEPT
+        driver hooks
+
+DESCRIPTION
+        To allow a greater flexibility of the muds, the gamedrivers
+        since 3.2.1 moved several once hardcoded 'underground'
+        activities from the driver into the mudlib. This includes for
+        example the differences between compat and native mode.
+
+        The hooks are set with the privileged efun set_driver_hook().
+        Some of the hooks are mandatory, some not. Most hooks accept
+        unbound lambda closures as values, some also lfun closures or
+        even strings.
+        The hooks are identified by an ordinal number, for which
+        symbolic names are defined in /sys/driverhooks.h.
+
+SEE ALSO
+        native(C), set_driver_hook(E)
diff --git a/doc/hook/include_dirs b/doc/hook/include_dirs
new file mode 100644
index 0000000..6557359
--- /dev/null
+++ b/doc/hook/include_dirs
@@ -0,0 +1,38 @@
+SYNOPSIS
+        #include <sys/driver_hooks.h>
+
+        set_driver_hook(H_INCLUDE_DIRS, value)
+
+        <value> being:
+
+          string *<dirs>
+          string <closure>(string include_name, string current_file)
+
+DESCRIPTION
+        Semi-mandatory hook specifying the directories where <>-type
+        include files are searched (this includes ""-includes not
+        found as specified).  Hook setting may be any closure or a
+        string array. If not set, only ""-type includes may be used in LPC
+        programs.
+
+        The hook is called only if a call to master::include_file()
+        does not return a usable filename.
+
+        If the hook setting is a string array, it has to contain the
+        path names of those directories where <>-type includes are to
+        be searched. The directories are searched in the order they
+        appear in the array. The directory name and the name of the
+        actual include file are concatenated, therefore the directory
+        names have to end in '/'. Leading slashes may be omitted.
+
+        If the setting is a closure, it is called with the name of the
+        desired include file as first, and the name of the compiled
+        LPC file as second argument.  Result has to be the complete
+        path name of the include file to use. Leading slashes may be
+        omitted.  If the closure is a lambda closure, it is bound to
+        this_object() prior to execution.
+
+HISTORY
+
+SEE ALSO
+        hooks(C), auto_include(H), include_file(M)
diff --git a/doc/hook/load_uids b/doc/hook/load_uids
new file mode 100644
index 0000000..9d1e160
--- /dev/null
+++ b/doc/hook/load_uids
@@ -0,0 +1,35 @@
+SYNOPSIS
+        #include <sys/driver_hooks.h>
+
+        set_driver_hook(H_LOAD_UIDS, value)
+
+        <value> being:
+
+          mixed <closure> (string objectname)
+
+DESCRIPTION
+        Mandatory hooks to determine the uid and euid of loaded or
+        cloned objects.  Hook settings can be any closure.
+
+        When an object is newly loaded, the H_LOAD_UIDS hook is called
+        with the object name as argument.  The new object already
+        exists, but has 0 uids.
+
+        For the result, the following possibilities exist (<num> is
+        a non-zero number, <no-string> is anything but a string):
+
+           "<uid>"                    -> uid = "<uid>", euid = "<uid>"
+           ({ "<uid>", "<euid>" })    -> uid = "<uid>", euid = "<euid>"
+           ({ "<uid>", <no-string> }) -> uid = "<uid>", euid = 0
+
+        If strict-euids is not active, the following results are
+        possible, too:
+
+           <num>                      -> uid = 0, euid = 0
+           ({ <num>, "<euid>" })      -> uid = 0, euid = "<euid>"
+           ({ <num>, <no-string> })   -> uid = 0, euid = 0
+
+HISTORY
+
+SEE ALSO
+        hooks(C), uids(C), clone_uids(H)
diff --git a/doc/hook/modify_command b/doc/hook/modify_command
new file mode 100644
index 0000000..f478312
--- /dev/null
+++ b/doc/hook/modify_command
@@ -0,0 +1,61 @@
+SYNOPSIS
+        #include <sys/driver_hooks.h>
+
+        set_driver_hook(H_MODIFY_COMMAND, value)
+
+        <value> being:
+
+          int|string <closure>(string cmd, object player)
+          int|string <name>(string cmd)
+          <mapping>
+
+DESCRIPTION
+        Optional hook to modify commands (both entered or given by a
+        call to command()) before the parser sees them (this includes
+        special commands like 'status').
+
+        Hook setting can be any closure, the name of the function to
+        call in the object, or a mapping.
+
+        For interactives this hook is used only if the interactive
+        object has no command modifier already set by the efun
+        set_modify_command().
+
+        If the hook is a closure, it is called with the entered
+        command as first, and the command giving player as second
+        argument. Lambda closures are bound to the command giving player,
+        unbound-lambda closures remain unbound.
+
+        If the hook is a string, it is used as the name of an lfun
+        in the command giving player, which is called with the command
+        as argument.
+
+        If the hook is a mapping, it is queried with the given command
+        as index, and the data retrieved is used as new command
+        (defaults to 0 if no data is stored for a given command). If
+        an entry is a closure instead of a string, it is called as
+
+          int|string <closure>(string cmd, object player)
+
+        and the result from the call is used as 'the' command.
+
+        The result is treated equal in all three cases:
+         - If the result is a string, it is the new command to execute
+           instead of the given one. Note that it is not possible to
+           make several commands from one this way!
+         - If the result is a non-zero number, the given command is to
+           be ignored. In case of the closure/lfun setting this may
+           mean that the closure/lfun already executed it.
+         - If the result is 0, the originally given command is to be
+           used.
+
+        It is possible for the hook to change the command giver
+        (this_player()) for the execution of the command. This means that
+        even though the commands are execute for the original commandgiver,
+        this_player() will return the changed commandgiver.
+
+HISTORY
+
+SEE ALSO
+        hooks(C), command(H), modify_command_fname(H), notify_fail(H),
+        send_notify_fail(H)
diff --git a/doc/hook/modify_command_fname b/doc/hook/modify_command_fname
new file mode 100644
index 0000000..095ef80
--- /dev/null
+++ b/doc/hook/modify_command_fname
@@ -0,0 +1,44 @@
+SYNOPSIS
+        #include <sys/driver_hooks.h>
+
+        set_driver_hook(H_MODIFY_COMMAND_FNAME, value)
+
+        <value> being:
+
+          int|string <name>(string cmd)
+
+DESCRIPTION
+        Mandatory hook specifying the name of the 'modify_command'
+        lfun to call for newly entered commands as result of a
+        set_modify_command().
+
+        Hook setting must be a string.
+
+        If set_modify_command() is used for an interactive user, all
+        newly entered commands are first passed to the function named
+        by this hook.
+
+        The function is called with the command as argument.
+
+        If the result is a string, it is the new command to execute
+        instead of the given one. Note that it is not possible to make
+        several commands from one this way!
+
+        If the result is a non-zero number, the given command is to be
+        ignored. In case of the closure/lfun setting this may mean
+        that the closure/lfun already executed it.
+
+        If the result is 0, the originally given command is to be
+        used.
+
+        It is possible for the hook to change the command giver
+        (this_player()) for the execution of the command. This means
+        that even though the commands are execute for the original
+        commandgiver, this_player() will return the changed
+        commandgiver.
+
+HISTORY
+
+SEE ALSO
+        hooks(C), command(H), modify_command(H), notify_fail(H),
+        send_notify_fail(H)
diff --git a/doc/hook/move_object b/doc/hook/move_object
new file mode 100644
index 0000000..5b2445d
--- /dev/null
+++ b/doc/hook/move_object
@@ -0,0 +1,27 @@
+SYNOPSIS
+        #include <sys/driver_hooks.h>
+
+        set_driver_hook(H_MOVE_OBJECT0, value)
+        set_driver_hook(H_MOVE_OBJECT1, value)
+
+        <value> being:
+
+          void <closure>(object item, object dest)
+
+DESCRIPTION
+        Mandatory hooks to implement the efun void move_object().
+        Hook setting must be an unbound lambda closure.
+
+        Upon call, the hook has to perform the move itself (by using
+        set_environment()) and all depending actions (like the calls to
+        init() to add actions).
+
+        The difference lies in the binding of the set hook prior to
+        the call: the H_MOVE_OBJECT0 closure is bound to the current
+        object, the H_MOVE_OBJECT1 to 'item'.
+        If both hooks are set, H_MOVE_OBJECT0 is ignored.
+
+HISTORY
+
+SEE ALSO
+        move_object(E), set_environment(E), hooks(C)
diff --git a/doc/hook/msg_discarded b/doc/hook/msg_discarded
new file mode 100644
index 0000000..5360dfe
--- /dev/null
+++ b/doc/hook/msg_discarded
@@ -0,0 +1,28 @@
+SYNOPSIS
+        #include <sys/driver_hooks.h>
+
+        set_driver_hook(H_MSG_DISCARDED, value)
+
+        <value> being:
+
+          string <msg>
+          string <closure>(object user)
+
+DESCRIPTION
+        Optional hook to specify a message or take other measures
+        when a message had to be discarded, because they could not
+        be delivered to the player <user>. If the hook is not set,
+        a standard message is used.
+
+        If the hook is a string, this text will be sent as soon as
+        possible to the player informing about the lost transmission.
+
+        If the hook is a closure, it is the function to be called
+        and the result is used as the message to be sent. Lambda
+        closures are bound to the interactive <user> first.
+
+HISTORY
+        Introduced in LDMud 3.3.719
+
+SEE ALSO
+        hooks(C), configure_interactive(E)
diff --git a/doc/hook/no_echo b/doc/hook/no_echo
new file mode 100644
index 0000000..b592529
--- /dev/null
+++ b/doc/hook/no_echo
@@ -0,0 +1,41 @@
+SYNOPSIS
+        #include <sys/driver_hooks.h>
+
+        set_driver_hook(H_TELNET_NEG, value)
+
+        <value> being:
+
+          void <name>(int flag, object user, int no_telnet)
+          void <closure>(int flag, object user, int no_telnet)
+
+DESCRIPTION
+        Optional hook to specifiy how to perform the telnet actions to
+        switch the echo mode (used for e.g. password input_to()s).
+        Hook setting may be any closure or a string.  If not set, a
+        default handling is performed.
+
+        If the setting is a string, it used as name of an lfun to call
+        in the interactive <user>, where <flag> is the echo-flag
+        passed to the input_to() statement.
+
+        If the setting is a closure, it is called with the same
+        arguments, and unbound lambda-closures being bound to
+        this_player() prior to execution.
+
+        <local> is a boolean flag: it is TRUE when input_to() was
+        called with the INPUT_NO_TELNET flag.
+
+        When set, the hook is called whenever the driver needs to
+        change the echo mode, thus you can negotiate about things that
+        are coupled with it, like LINEMODE or character-at-a-time.
+
+        IMPORTANT: If this hook is used, the control of all telnet
+        negotiation is transferred to the mudlib: all incoming negotiations
+        are passed to H_TELNET_NEG, and the sending of no-echo negotiations
+        is handled by this hook.
+
+HISTORY
+        LDMud 3.2.11/LDMud 3.3.593 added the <no_telnet> argument.
+
+SEE ALSO
+        hooks(C), telnet(C), telnet_neg(H)
diff --git a/doc/hook/no_ipc_slot b/doc/hook/no_ipc_slot
new file mode 100644
index 0000000..4d1b0fb
--- /dev/null
+++ b/doc/hook/no_ipc_slot
@@ -0,0 +1,22 @@
+SYNOPSIS
+        #include <sys/driver_hooks.h>
+
+        set_driver_hook(H_NO_IPC_SLOT, value)
+
+        <value> being:
+
+          0
+          string <msg>
+
+DESCRIPTION
+        Optional hook specifying the message given to logins
+        rejected due to space limitations (MAX_PLAYER).
+        Hook setting has to be string.
+
+        If set to 0, the default message "Lpmud is full. Come back
+        later." is issued.
+
+HISTORY
+
+SEE ALSO
+        hooks(C)
diff --git a/doc/hook/notify_fail b/doc/hook/notify_fail
new file mode 100644
index 0000000..8a4bacf
--- /dev/null
+++ b/doc/hook/notify_fail
@@ -0,0 +1,33 @@
+SYNOPSIS
+        #include <sys/driver_hooks.h>
+
+        set_driver_hook(H_NOTIFY_FAIL, value)
+
+        <value> being:
+
+          string <msg>
+          string <closure>(string entered_command, object cmd_giver)
+
+DESCRIPTION
+        Mandatory hook to issue the default message if an entered
+        command couldn't be parsed and no notify_fail() command is in
+        effect.  Hook setting can be a any closure, or a string.
+
+        If set to a string, it is the message returned to the
+        player.
+
+        If set to a closure, it is called with the command and the
+        command giver as arguments, and the result is used as failure
+        message. Lambda closures are bound to this_player() prior to
+        execution.
+
+        <cmd_giver> is the object which received the command in the
+        first place. It is usually identical with this_player(),
+        unless the H_MODIFY_COMMAND hook changed it.
+
+HISTORY
+        LDMud 3.2.7 added the new 'command_giver' argument.
+
+SEE ALSO
+        hooks(C), command(H), modify_command(H), modify_command_fname(H),
+        send_notify_fail(H)
diff --git a/doc/hook/print_prompt b/doc/hook/print_prompt
new file mode 100644
index 0000000..f864db7
--- /dev/null
+++ b/doc/hook/print_prompt
@@ -0,0 +1,28 @@
+SYNOPSIS
+        #include <sys/driver_hooks.h>
+
+        set_driver_hook(H_PRINT_PROMPT, value)
+
+        <value> being:
+
+          void <name>(string prompt).
+          void <closure>(string prompt)
+
+DESCRIPTION
+        Optional hook to print the current command prompt. If this
+        hook is not set, the driver will just print the prompt to the
+        user.
+
+        The hook is called with the prompt string as single argument
+        and has to print the prompt, e.g. using write() or
+        binary_message().
+
+        If the hook is a string, it is the name of an lfun in the
+        command giver. If the hook is a closure, it is called
+        with the command giver as previous object.
+
+HISTORY
+        Introduced in LDMud 3.3.163.
+
+SEE ALSO
+        hooks(C), default_prompt(H)
diff --git a/doc/hook/regexp_package b/doc/hook/regexp_package
new file mode 100644
index 0000000..ae52e3f
--- /dev/null
+++ b/doc/hook/regexp_package
@@ -0,0 +1,23 @@
+SYNOPSIS
+        #include <sys/driver_hooks.h>
+        #include <sys/regexp.h>
+
+        set_driver_hook(H_REGEXP_PACKAGE, value)
+
+        <value> being an integer:
+          0
+          RE_PCRE
+          RE_TRADITIONAL
+
+DESCRIPTION
+        Optional hook to select the default regexp package to use
+        for regular expression functions.
+
+        If set to 0, the default package determined by the driver's
+        configuration/commandline options is used.
+
+HISTORY
+        Introduced in LDMud 3.3.595.
+
+SEE ALSO
+        hooks(C), default_prompt(H), invocation(D), regexp(C)
diff --git a/doc/hook/reset b/doc/hook/reset
new file mode 100644
index 0000000..23f1dea
--- /dev/null
+++ b/doc/hook/reset
@@ -0,0 +1,38 @@
+SYNOPSIS
+        #include <sys/driver_hooks.h>
+
+        set_driver_hook(H_RESET, value)
+
+        <value> being:
+
+          void|int <closure> ( void )
+          void <name>(1)
+
+DESCRIPTION
+        Optional hook to reset an object.
+        Hook setting can be unbound lambda closures, or the name of
+        the function (static or public) to call in the object.
+
+        If the hook is a closure, it is bound to the object to be
+        reset and called with no argument.
+
+        If the result of this 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 TIME_TO_RESET is
+        used.  If the result is a negative number, the object will not
+        be reset again, unless directed otherwise by set_next_reset().
+
+        If the hook is defined as the name of an lfun in the object,
+        it is called in the object with 1 as argument, and any result
+        is ignored.  In this call the previous_object() is the object
+        initiating the reset.  If the function does not exist, the
+        object won't be reset again.
+
+        Note that an object is only reset by call to this hook if it
+        has been used since the last reset.
+
+HISTORY
+        LDMud 3.2.10 allowed static functions to be given by name.
+
+SEE ALSO
+        hooks(C)
diff --git a/doc/hook/send_notify_fail b/doc/hook/send_notify_fail
new file mode 100644
index 0000000..7f61bb4
--- /dev/null
+++ b/doc/hook/send_notify_fail
@@ -0,0 +1,34 @@
+SYNOPSIS
+        #include <sys/driver_hooks.h>
+
+        set_driver_hook(H_SEND_NOTIFY_FAIL, value)
+
+        <value> being:
+
+          void <name>(string msg, object msgobj, object orig_cmd_giver)
+          void <closure>(string msg, object msgobj, object orig_cmd_giver)
+
+DESCRIPTION
+        Optional hook to send the notify fail message, regardless
+        of how it was determined, to the player. If the hook is not
+        set, the message is delivered using tell_object() internally.
+        Hook setting can be a string or a closure.
+
+        If the hook is a string, it is the name of a (possibly static)
+        function to call in the current command giver. If the hook
+        is a closure, it is the function to be called. Lambda closures
+        are bound to the current command giver first.
+
+        The arguments to the call are:
+         - <msg> is the notify fail message to be delivered.
+         - <msgobj> is the object which set the message. It is 0 for
+           the default message.
+         - <orig_cmd_giver> is the object for which the original
+           command was first received. It is usually identical with
+           the current command giver this_player().
+
+HISTORY
+
+SEE ALSO
+        hooks(C), command(H), modify_command(H), modify_command_fname(H),
+        notify_fail(H)
diff --git a/doc/hook/telnet_neg b/doc/hook/telnet_neg
new file mode 100644
index 0000000..0f8b8c1
--- /dev/null
+++ b/doc/hook/telnet_neg
@@ -0,0 +1,72 @@
+SYNOPSIS
+        #include <sys/driver_hooks.h>
+
+        set_driver_hook(H_TELNET_NEG, value)
+
+        <value> being:
+
+          void|mixed <name>(int action, int option [, int * opts ] )
+          void|mixed <closure>(int action, int option [, int * opts ] )
+
+DESCRIPTION
+        Optional hook to specifiy how to perform a single telnet
+        negotiation.  Hook setting may be any closure or a string.  If
+        not set, most telnet options are rejected (read: only a very
+        minimal negotiation takes place).
+
+        The hook is called whenever the driver receives a demand for
+        option negotiation for any option the driver does not handle itself.
+        By default, the driver deals with the following options:
+            TELOPT_ECHO:      Echo option
+            TELOPT_SGA:       Suppress Go Ahead (nearly always on)
+            TELOPT_COMPRESS:  Mud client compression protocol (obsolete)
+            TELOPT_COMPRESS2: Mud client compression protocol V2
+
+        For all other telnet options negotiations, this hook is called.
+
+        The hook has then to perform the negotiation using the efun
+        binary_message().
+
+        Alternatively, if H_NOECHO is set, this hook is called for
+        _all_ telnet data received.
+
+        If the setting is a string, it used as name of an lfun to call
+        in this_player(). Closures are just called, with unbound
+        lambda-closures being bound to this_player() prior to
+        execution.
+
+        The hook is called for a 'DO/DONT/WILL/WONT <opt>' with the action
+        (DO/DONT/...) as the first, and <opt> as the second argument.
+
+        For example:, if the driver receives the sequence
+
+          IAC SB <opt> <opts>...
+
+        followed by IAC SB/SE,  the hook is called with 'SB' as first
+        argument, <opt> as second, and <opts> as an array of integers as
+        third argument.
+
+REMARKS
+        An incomplete list of telnet negotiations this hook is called
+        for includes the following:
+            SB:               Suboption negotiation
+            TELOPT_LINEMODE:  linemode
+            TELOPT_NAWS:      window size
+            TELOPT_TTYPE:     terminal type
+            TELOPT_TM:        timing mark
+            TELOPT_NEWENV:    remote environment variables
+            TELOPT_ENVIRON:   remote environment variables
+            TELOPT_XDISPLOC:  remote X display address
+            TELOPT_TSPEED:    terminal speed
+            TELOPT_BINARY:    binary data, needed for non-ASCII charsets
+            TELOPT_EOR:       TinyFugue prompt marker (together with EOR)
+
+            TELOPT_MSP:       Mud Sound Protocol
+            TELOPT_MXP:       Mud Extension Protocol
+            TELOPT_MSSP:      Mud Server Status Protocol
+            TELOPT_GMCP:      Generic Mud Communication Protocol
+
+HISTORY
+
+SEE ALSO
+        hooks(C), telnet(C), no_echo(H)