[an error occurred while processing this directive]
[<a href="index.shtml">Package Index</a></code> | <a href="index_std.shtml">Mudlib Index</a></code> | <a href="index_eff.shtml">Effect Index</a></code>]<br><h2>Includes</h2>
This class includes the following files <a href="include.refresh.h.shtml">/include/refresh.h</a>, /d/am/include/amcw.h, <a href="include.player_handler.h.shtml">/include/player_handler.h</a> and <a href="include.login_handler.h.shtml">/include/login_handler.h</a><h2>Class Index</h2>
<ul><li><a href="#class_crime">crime</a>
</ul><h2>Method index</h2>
<dl><ul>
<li><a href="#add_crime">add_crime</a>(string, int, string, string)<br/>
Adds a crime to the criminal's record.
<li><a href="#add_temporary_crime">add_temporary_crime</a>(string, int, string, string)<br/>
Adds a temporary crime to a criminal's record.
<li><a href="#banish_person">banish_person</a>(string, int)<br/>
This function adds a player as banished.
<li><a href="#banish_person_suspend">banish_person_suspend</a>(string)<br/>
This function supends (removes) a player's banishment (to be used when the
case is appealed).
<li><a href="#clear_crimes">clear_crimes</a>(string)<br/>
Wipes the entire "permanent" criminal record of a player or NPC.
<li><a href="#clear_temporary_crimes">clear_temporary_crimes</a>(string)<br/>
Clears all the temporary crimes for a player or NPC.
<li><a href="#is_banished">is_banished</a>(string)<li><a href="#player_delete">player_delete</a>(string, int)<br/>
This is the function called by the login-handler when a player is deleted
so that a potential criminal-record can be erased as well.
<li><a href="#player_login">player_login</a>(string, string)<br/>
This is the function called by the login-handler when a player logs in
so that a potential criminal-record can be loaded.
<li><a href="#player_netdead">player_netdead</a>(string, string)<li><a href="#player_reconnect">player_reconnect</a>(string, string)<li><a href="#player_refresh">player_refresh</a>(object, int)<br/>
This is the function called by the login-handler when a player refreshes
so that a potential criminal-record can be cleared.
<li><a href="#query_all_criminals">query_all_criminals</a>()<br/>
This returns all the criminals that are currently being sought.
<li><a href="#query_banished">query_banished</a>()<br/>
This function returns the names of all banished players and also deletes
banishments which are over from the handler.
<li><a href="#query_banished_time">query_banished_time</a>(string)<li><a href="#query_city_gate">query_city_gate</a>(string)<li><a href="#query_crimes">query_crimes</a>(string, int)<br/>
Returns all the crimes a player or NPC is guilty of or those that have been
recorded before a given time, if the last_update-parameter is specified.
<li><a href="#query_crimes_long">query_crimes_long</a>(string)<br/>
Returns an array with the elaborate descriptions of all crimes a player or
NPC is known to have committed.
<li><a href="#query_criminal">query_criminal</a>(string, int)<br/>
Checks whether the specified player (or NPC) is a known criminal.
<li><a href="#query_criminals">query_criminals</a>()<br/>
This function returns the names of all online criminals with permanent
records.
<li><a href="#query_prison_for">query_prison_for</a>(string)<br/>
Queries the prison for a watch-district.
<li><a href="#query_prisons">query_prisons</a>()<br/>
This function returns the prisons registerd with the handler.
<li><a href="#query_registered_watchmen">query_registered_watchmen</a>()<br/>
This function returns the registered watchmen-objects.
<li><a href="#query_temp_criminals">query_temp_criminals</a>()<br/>
This function returns the names of all online criminals with temporary
records.
<li><a href="#query_total_severity">query_total_severity</a>(string)<br/>
Returns the severity-rating of all the crimes a criminal committed.
<li><a href="#register_watchman">register_watchman</a>(object)<br/>
This function is used to register a watchman-object for reinforcement issues.
<li><a href="#remove_temporary_crime">remove_temporary_crime</a>(string, string)<br/>
Removes a temporary crime from a criminal's record.
<li><a href="#save_crimes">save_crimes</a>()<br/>
Saves the entire contents of the _criminals-mapping to the respective
files.
<li><a href="#save_this_criminal">save_this_criminal</a>(string)<br/>
Function that saves a criminal's record and removes him from the mapping
(can for instance be used if the player logs off).
<li><a href="#set_gate_for">set_gate_for</a>(string, string)<li><a href="#set_prison_for">set_prison_for</a>(string, string)<br/>
This function is used to assign a prison to a given zone.
<li><a href="#unregister_watchman">unregister_watchman</a>(object)<br/>
This function is used to unregister a watchman-object when it dies.
</ul><h2>Public Functions</h2>
These are functions that everyone can access.<p>
.<ul><a name="add_crime">
add_crime</a><pre>
varargs int add_crime(string criminal,
                      int severity,
                      string short,
                      string long)
</pre></br>
Adds a crime to the criminal's record.  The time is recorded automatically.
<br/><ul>
<li><b>Parameters:</b>
<br/>criminal - the name of the criminal
<br/>severity - the severity of the crime (1 to 5, 5 being the highest)
<br/>short - a short description of the crime
<br/>long - a longer description of the crime, if desired
<li><b>Returns:</b>
<br/>1 on success, 0 on failure

</dl>

<ul><a name="add_temporary_crime">
add_temporary_crime</a><pre>
varargs int add_temporary_crime(string criminal,
                                int severity,
                                string short,
                                string long)
</pre></br>
Adds a temporary crime to a criminal's record.
<br/><ul>
<li><b>Parameters:</b>
<br/>criminal - the name of the criminal
<br/>severity - the severity of the crime (1 to 5, 5 being the highest)
<br/>short - a short description of the crime
<br/>long - a longer description of the crime, if desired
<li><b>Returns:</b>
<br/>1 on success or 0 on failure

</dl>

<ul><a name="banish_person">
banish_person</a><pre>
void banish_person(string name,
                   int days)
</pre></br>
This function adds a player as banished.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - The player's name
<br/>days - The number of days

</dl>

<ul><a name="banish_person_suspend">
banish_person_suspend</a><pre>
void banish_person_suspend(string name)
</pre></br>
This function supends (removes) a player's banishment (to be used when the
case is appealed).
<br/><ul>
<li><b>Parameters:</b>
<br/>name - The player's name

</dl>

<ul><a name="clear_crimes">
clear_crimes</a><pre>
int clear_crimes(string criminal)
</pre></br>
Wipes the entire "permanent" criminal record of a player or NPC.
<br/><ul>
<li><b>Parameters:</b>
<br/>criminal - the name of the criminal
<li><b>Returns:</b>
<br/>1 on success, otherwise 0

</dl>

<ul><a name="clear_temporary_crimes">
clear_temporary_crimes</a><pre>
int clear_temporary_crimes(string criminal)
</pre></br>
Clears all the temporary crimes for a player or NPC.
<br/><ul>
<li><b>Parameters:</b>
<br/>criminal - the name of the criminal
<li><b>Returns:</b>
<br/>1 on success, 0 on failure

</dl>

<ul><a name="is_banished">
is_banished</a><pre>
int is_banished(string name)
</pre>
<ul><a name="player_delete">
player_delete</a><pre>
void player_delete(string name,
                   int type)
</pre></br>
This is the function called by the login-handler when a player is deleted
so that a potential criminal-record can be erased as well.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - The player's name
<br/>type - The type of the event.

</dl>

<ul><a name="player_login">
player_login</a><pre>
void player_login(string name,
                  string type)
</pre></br>
This is the function called by the login-handler when a player logs in
so that a potential criminal-record can be loaded.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - The player's name
<br/>type - The type of the event.

</dl>

<ul><a name="player_netdead">
player_netdead</a><pre>
void player_netdead(string player,
                    string watchman)
</pre>
<ul><a name="player_reconnect">
player_reconnect</a><pre>
void player_reconnect(string player,
                      string event_type)
</pre>
<ul><a name="player_refresh">
player_refresh</a><pre>
void player_refresh(object player,
                    int type)
</pre></br>
This is the function called by the login-handler when a player refreshes
so that a potential criminal-record can be cleared.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - The player's name
<br/>type - The type of the event.

</dl>

<ul><a name="query_all_criminals">
query_all_criminals</a><pre>
string * query_all_criminals()
</pre></br>
This returns all the criminals that are currently being sought.
<br/><ul>
<li><b>Returns:</b>
<br/>the keys of the seen_criminals- and _temp_criminals-mappings

</dl>

<ul><a name="query_banished">
query_banished</a><pre>
string * query_banished()
</pre></br>
This function returns the names of all banished players and also deletes
banishments which are over from the handler.
<br/><ul>
<li><b>Returns:</b>
<br/>An array containing all the names.

</dl>

<ul><a name="query_banished_time">
query_banished_time</a><pre>
int query_banished_time(string name)
</pre>
<ul><a name="query_city_gate">
query_city_gate</a><pre>
string query_city_gate(string zone)
</pre>
<ul><a name="query_crimes">
query_crimes</a><pre>
varargs string * query_crimes(string criminal,
                              int last_update)
</pre></br>
Returns all the crimes a player or NPC is guilty of or those that have been
recorded before a given time, if the last_update-parameter is specified.
<br/><ul>
<li><b>Parameters:</b>
<br/>criminal - the name of the player or NPC
<br/>last_update - the time-value before which the crime must have happened
<li><b>Returns:</b>
<br/>an array with the crimes' shorts or an empty array

</dl>

<ul><a name="query_crimes_long">
query_crimes_long</a><pre>
string * query_crimes_long(string criminal)
</pre></br>
Returns an array with the elaborate descriptions of all crimes a player or
NPC is known to have committed.
<br/><ul>
<li><b>Parameters:</b>
<br/>criminal - the name of the criminal
<li><b>Returns:</b>
<br/>an empty array or one containing all the crimes' longs

</dl>

<ul><a name="query_criminal">
query_criminal</a><pre>
varargs int query_criminal(string criminal,
                           int last_update)
</pre></br>
Checks whether the specified player (or NPC) is a known criminal.  If the
last_update-parameter is given, only crimes recorded before that time will
be counted.
<br/><ul>
<li><b>Parameters:</b>
<br/>criminal - the name of the player or NPC
<br/>last_update - the time-value before which the crime must have happened
<li><b>Returns:</b>
<br/>1 if the person is a criminal, 0 if not

</dl>

<ul><a name="query_criminals">
query_criminals</a><pre>
string * query_criminals()
</pre></br>
This function returns the names of all online criminals with permanent
records.
<br/><ul>
<li><b>Returns:</b>
<br/>an array containing all the names.

</dl>

<ul><a name="query_prison_for">
query_prison_for</a><pre>
string query_prison_for(string zone)
</pre></br>
Queries the prison for a watch-district.
<br/><ul>
<li><b>Parameters:</b>
<br/>zone - the name of the district
<li><b>Returns:</b>
<br/>the file for the prison

</dl>

<ul><a name="query_prisons">
query_prisons</a><pre>
mapping query_prisons()
</pre></br>
This function returns the prisons registerd with the handler.
<br/><ul>
<li><b>Returns:</b>
<br/>the mapping of prisons

</dl>

<ul><a name="query_registered_watchmen">
query_registered_watchmen</a><pre>
object * query_registered_watchmen()
</pre></br>
This function returns the registered watchmen-objects.
<br/><ul>
<li><b>Returns:</b>
<br/>The array with the watchmen-objects

</dl>

<ul><a name="query_temp_criminals">
query_temp_criminals</a><pre>
string * query_temp_criminals()
</pre></br>
This function returns the names of all online criminals with temporary
records.
<br/><ul>
<li><b>Returns:</b>
<br/>an array containing all the names.

</dl>

<ul><a name="query_total_severity">
query_total_severity</a><pre>
int query_total_severity(string criminal)
</pre></br>
Returns the severity-rating of all the crimes a criminal committed.
<br/><ul>
<li><b>Parameters:</b>
<br/>criminal - the name of the criminal
<li><b>Returns:</b>
<br/>the sum of all the severities or -1 if there are no crimes.

</dl>

<ul><a name="register_watchman">
register_watchman</a><pre>
void register_watchman(object wm)
</pre></br>
This function is used to register a watchman-object for reinforcement issues.
<br/><ul>
<li><b>Parameters:</b>
<br/>wm - The object to register.

</dl>

<ul><a name="remove_temporary_crime">
remove_temporary_crime</a><pre>
int remove_temporary_crime(string criminal,
                           string short)
</pre></br>
Removes a temporary crime from a criminal's record.
<br/><ul>
<li><b>Parameters:</b>
<br/>criminal - the name of the criminal
<br/>short - the short description of the crime to remove
<li><b>Returns:</b>
<br/>1 on success, 0 on failure

</dl>

<ul><a name="save_crimes">
save_crimes</a><pre>
int save_crimes()
</pre></br>
Saves the entire contents of the _criminals-mapping to the respective
files.
<br/><ul>
<li><b>Returns:</b>
<br/>1 if everything worked, otherwise 0

</dl>

<ul><a name="save_this_criminal">
save_this_criminal</a><pre>
int save_this_criminal(string criminal)
</pre></br>
Function that saves a criminal's record and removes him from the mapping
(can for instance be used if the player logs off).
<br/><ul>
<li><b>Parameters:</b>
<br/>criminal - the name of the criminal
<li><b>Returns:</b>
<br/>1 on success, 0 on failure

</dl>

<ul><a name="set_gate_for">
set_gate_for</a><pre>
void set_gate_for(string zone,
                  string file)
</pre>
<ul><a name="set_prison_for">
set_prison_for</a><pre>
void set_prison_for(string zone,
                    string file)
</pre></br>
This function is used to assign a prison to a given zone.
<br/><ul>
<li><b>Parameters:</b>
<br/>zone - The name of the watch-zone
<br/>file - The filename of the prison-object.

</dl>

<ul><a name="unregister_watchman">
unregister_watchman</a><pre>
void unregister_watchman(object wm)
</pre></br>
This function is used to unregister a watchman-object when it dies.
<br/><ul>
<li><b>Parameters:</b>
<br/>wm - The object to unregister.

</dl>


<h2>Classes</h2>
These are nice data types for dealing with...  Data!<p>
<ul>
<li><a name="class_crime">
crime</a><pre>
class crime {
              int time;
              string short;
              string long;
              int severity;
}

</pre>
</ul>
[an error occurred while processing this directive]

