/
html/
<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.51
     from ProgrammersManual.texinfo on 4 March 1997 -->

<TITLE>LambdaMOO Programmer's Manual - First Tasks</TITLE>
</HEAD>
<BODY>
Go to the <A HREF="ProgrammersManual_1.html">first</A>, <A HREF="ProgrammersManual_68.html">previous</A>, <A HREF="ProgrammersManual_70.html">next</A>, <A HREF="ProgrammersManual_77.html">last</A> section, <A HREF="ProgrammersManual_toc.html">table of contents</A>.
<P><HR><P>


<H3><A NAME="SEC69" HREF="ProgrammersManual_toc.html#TOC69">The First Tasks Run By the Server</A></H3>

<P>
Whenever the server is booted, there are a few tasks it runs right at the
beginning, before accepting connections or getting the value of
<CODE>#0.dump_interval</CODE> to schedule the first checkpoint (see below for more
information on checkpoint scheduling).

</P>
<P>
First, the server calls <CODE>$user_disconnected()</CODE> once for each user who
was connected at the time the database file was written; this allows for any
cleaning up that's usually done when users disconnect (e.g., moving their
player objects back to some `home' location, etc.).

</P>
<P>
Next, it checks for the existence of the verb <CODE>$server_started()</CODE>.  If
there is such a verb, then the server runs a task invoking that verb with no
arguments and with <CODE>player</CODE> equal to <CODE>#-1</CODE>.  This is useful for
carefully scheduling checkpoints and for re-initializing any state that is not
properly represented in the database file (e.g., re-opening certain outbound
network connections, clearing out certain tables, etc.).

</P>
<P><HR><P>
Go to the <A HREF="ProgrammersManual_1.html">first</A>, <A HREF="ProgrammersManual_68.html">previous</A>, <A HREF="ProgrammersManual_70.html">next</A>, <A HREF="ProgrammersManual_77.html">last</A> section, <A HREF="ProgrammersManual_toc.html">table of contents</A>.
</BODY>
</HTML>