[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>File /obj/handlers/playerinfo.c</h2>
Playerinfo database handler.

This handler collects all the fascinating information about players and
their sins. At the moment, the following events are supported:
replace (all replacements, added by Presto's wand),
gag (gagging and ungagging, added by the gagger),
suspend (player suspension, added by the "suspend" command),
meteor (meteoring a player, added by the "meteor" command),
multiplay (various events added by the multiplayer handler),
harassment (comments about cases of harassment, added via 'addevent'),
misc (misc. comments, added via 'addevent'),
cheat (currently unused)
 *
The "replace" and "multiplay" events are debounced (merged). In addition,
the "replace" events expire in 30 days.
<p>Written by Fiona
<h2>Inherits</h2>
This class inherits the following classes /std/object.c<h2>Includes</h2>
This class includes the following files /include/refresh.h, /include/applications.h, /include/newbiehelpers.h, /include/player_handler.h and /include/playerinfo.h<h2>Class Index</h2>
<ul><li><a href="#class_source">source</a>
</ul><h2>Method index</h2>
<ul>
<li><a href="#acknowledge_alert">acknowledge_alert</a>(object, string, string, int, string, mixed *)<li><a href="#add_alt">add_alt</a>(object, string, string)<br/>
Add an alt character name to this player's dossier.
<li><a href="#add_alts">add_alts</a>(object, string, string *)<br/>
Adds an array of alts from this player's dossier.
<li><a href="#add_entry">add_entry</a>(object, string, string, string, mixed *)<br/>
Add a new entry to the player's database.
<li><a href="#clear_alerts_for">clear_alerts_for</a>(string)<br/>
<li><a href="#decrement_alerts_for">decrement_alerts_for</a>(string)<br/>
<li><a href="#delete_alt">delete_alt</a>(object, string, string)<br/>
Delete an alt character name from this player's dossier.
<li><a href="#delete_alts">delete_alts</a>(object, string, string *)<br/>
Delete an array of alts from this player's dossier.
<li><a href="#delete_entry">delete_entry</a>(object, string, string, int)<br/>
Delete an entry from the playerinfo database.
<li><a href="#increment_alerts_for">increment_alerts_for</a>(string)<br/>
<li><a href="#is_alert">is_alert</a>(string, int)<br/>
<li><a href="#load_handler_data">load_handler_data</a>()<li><a href="#player_remove">player_remove</a>(string)<br/>
Remove the player's data file.
<li><a href="#query_access_history">query_access_history</a>(string)<li><a href="#query_alerts">query_alerts</a>()<br/>
 @return The alerts mapping.
<li><a href="#query_alerts_for">query_alerts_for</a>(string)<br/>
<li><a href="#query_all_alts">query_all_alts</a>(string, int)<br/>
Return all of a player's alts, with option of including this character.
<li><a href="#query_alt_of">query_alt_of</a>(string)<br/>
Return which player this player is an alt of (if any).
<li><a href="#query_alts">query_alts</a>(string)<li><a href="#query_deleter_ok">query_deleter_ok</a>(string, object)<br/>
Check if the request to delete an event came from the valid source.
<li><a href="#query_dossier">query_dossier</a>(object, string, int)<br/>
Print all entries from the given player's dossier.
<li><a href="#query_event">query_event</a>(object, string, string)<br/>
Print all entries from the given player's dossier with the given event
type.
<li><a href="#query_event_count">query_event_count</a>(object, string, string)<br/>
Get a count of the total number of event types.
<li><a href="#query_events">query_events</a>()<br/>
Answer the list of all possible events.
<li><a href="#query_interleaved">query_interleaved</a>(object, string, string)<br/>
Print all entries for this player and all alts, in chronological order.
<li><a href="#query_name">query_name</a>()<li><a href="#query_online_alerts">query_online_alerts</a>()<br/>
<li><a href="#query_source_ok">query_source_ok</a>(string, string)<br/>
Check if the event has come from the valid source.
<li><a href="#query_timeouts">query_timeouts</a>()<li><a href="#reregister_parent">reregister_parent</a>(string)<li><a href="#save_handler_data">save_handler_data</a>()</ul>
<h2>Public Functions</h2>
These are functions that everyone can access.<p>
<dl>
<dt class="autodocfuncname"><a name="acknowledge_alert">
acknowledge_alert</a><pre class="autodocfuncdef">
int acknowledge_alert(object creator,
                      string player,
                      string event,
                      int idx,
                      string update,
                      mixed * extra)
</pre>
<dt class="autodocfuncname"><a name="add_alt">
add_alt</a><pre class="autodocfuncdef">
string add_alt(object creator,
               string player,
               string alt)
</pre><dd><br />
Add an alt character name to this player's dossier. This function succeeds
if both characters are not "main", or only one if them is "main". Both
players will have their dossiers modified.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
player - the name of the player<br />
alts - the names of the alt characters to add<br />
<br />
<dd><b>Returns:</b>
<br />a string describing the outcome of the function call
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="add_alts">
add_alts</a><pre class="autodocfuncdef">
string add_alts(object creator,
                string player,
                string * alts)
</pre><dd><br />
Adds an array of alts from this player's dossier. Note that both
players have their dossier modified.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
player - the name of the player<br />
alts - the name of the alt characters to delete<br />
<br />
<dd><b>Returns:</b>
<br />a string describing the outcome of the function call
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="add_entry">
add_entry</a><pre class="autodocfuncdef">
int add_entry(object creator,
              string player,
              string event,
              string comment,
              mixed * extra)
</pre><dd><br />
Add a new entry to the player's database.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
source - the creator or another object trying to add the event<br />
player - the name of the player<br />
event - event the name of the event to be added<br />
comment - arbitrary comment text (more than one line is OK)<br />
extra - arbitrary array of arbitrary objects (can be 0)<br />
<br />
<dd><b>Returns:</b>
<br />nonzero if the entry was successfully added to the database
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="clear_alerts_for">
clear_alerts_for</a><pre class="autodocfuncdef">
void clear_alerts_for(string player)
</pre><dd><br /><br />
<br /><dl>
<dd><b>Parameters:</b><br />
player - The name of the player.
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="decrement_alerts_for">
decrement_alerts_for</a><pre class="autodocfuncdef">
int decrement_alerts_for(string player)
</pre><dd><br /><br />
<br /><dl>
<dd><b>Parameters:</b><br />
player - The name of the player.<br />
<br />
<dd><b>Returns:</b>
<br />The updated number of alerts for that player.
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="delete_alt">
delete_alt</a><pre class="autodocfuncdef">
string delete_alt(object creator,
                  string player,
                  string alt)
</pre><dd><br />
Delete an alt character name from this player's dossier. Note that both
players have their dossier modified.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
player - the name of the player<br />
alts - the name of the alt characters to delete<br />
<br />
<dd><b>Returns:</b>
<br />a string describing the outcome of the function call
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="delete_alts">
delete_alts</a><pre class="autodocfuncdef">
string delete_alts(object creator,
                   string player,
                   string * alts)
</pre><dd><br />
Delete an array of alts from this player's dossier. Note that both
players have their dossier modified.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
player - the name of the player<br />
alts - the name of the alt characters to delete<br />
<br />
<dd><b>Returns:</b>
<br />a string describing the outcome of the function call
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="delete_entry">
delete_entry</a><pre class="autodocfuncdef">
int delete_entry(object creator,
                 string player,
                 string event,
                 int n)
</pre><dd><br />
Delete an entry from the playerinfo database.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
source - the creator or another object trying to add the event<br />
player - the name of the player<br />
event - the name of the event of the entry being deleted<br />
n - the index of the entry being deleted<br />
<br />
<dd><b>Returns:</b>
<br />nonzero if the entry was successfully deleted
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="increment_alerts_for">
increment_alerts_for</a><pre class="autodocfuncdef">
int increment_alerts_for(string player)
</pre><dd><br /><br />
<br /><dl>
<dd><b>Parameters:</b><br />
player - The name of the player.<br />
<br />
<dd><b>Returns:</b>
<br />The updated number of alerts for that player.
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="is_alert">
is_alert</a><pre class="autodocfuncdef">
int is_alert(string player,
             int idx)
</pre><dd><br /><br />
<br /><dl>
<dd><b>Parameters:</b><br />
player - The name of the player<br />
idx - The number of the event to check for alert status.<br />
<br />
<dd><b>Returns:</b>
<br />0 if the event is not an alert, 1 if it is.
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="load_handler_data">
load_handler_data</a><pre class="autodocfuncdef">
void load_handler_data()
</pre>
<dt class="autodocfuncname"><a name="player_remove">
player_remove</a><pre class="autodocfuncdef">
void player_remove(string player)
</pre><dd><br />
Remove the player's data file.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
player - the name of the player
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_access_history">
query_access_history</a><pre class="autodocfuncdef">
string query_access_history(string player)
</pre>
<dt class="autodocfuncname"><a name="query_alerts">
query_alerts</a><pre class="autodocfuncdef">
mapping query_alerts()
</pre><dd><br />
 @return The alerts mapping.
<br />

<dt class="autodocfuncname"><a name="query_alerts_for">
query_alerts_for</a><pre class="autodocfuncdef">
int query_alerts_for(string player)
</pre><dd><br /><br />
<br /><dl>
<dd><b>Parameters:</b><br />
player - Name of the player to query<br />
<br />
<dd><b>Returns:</b>
<br />The number of alerts for that player
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_all_alts">
query_all_alts</a><pre class="autodocfuncdef">
varargs string * query_all_alts(string player,
                                int inclusive)
</pre><dd><br />
Return all of a player's alts, with option of including this character.
param player A character's name
param inclusive Include this character in the list of this player's alts
return the array of this character's alts
<br />

<dt class="autodocfuncname"><a name="query_alt_of">
query_alt_of</a><pre class="autodocfuncdef">
string query_alt_of(string player)
</pre><dd><br />
Return which player this player is an alt of (if any).
param player A players name
return the name of the players main alt.
<br />

<dt class="autodocfuncname"><a name="query_alts">
query_alts</a><pre class="autodocfuncdef">
string * query_alts(string player)
</pre>
<dt class="autodocfuncname"><a name="query_dossier">
query_dossier</a><pre class="autodocfuncdef">
varargs string query_dossier(object source,
                             string player,
                             int lastn)
</pre><dd><br />
Print all entries from the given player's dossier.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
source - the creator who requested the report<br />
player - the name of the player
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_event">
query_event</a><pre class="autodocfuncdef">
string query_event(object source,
                   string player,
                   string event)
</pre><dd><br />
Print all entries from the given player's dossier with the given event
type.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
source - the creator who requested the report<br />
player - the name of the player<br />
event - the name of the event
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_event_count">
query_event_count</a><pre class="autodocfuncdef">
int query_event_count(object creator,
                      string player,
                      string event)
</pre><dd><br />
Get a count of the total number of event types. This will exclude "lockouts" 
from "suspend" requests. <br />
<br /><dl>
<dd><b>Parameters:</b><br />
source - the person (may be a playtester or a creator) who requested 
the count<br />
event - the event they wish to tally.<br />
player - the name of the player to check.<br />
<br />
<dd><b>Returns:</b>
<br />an integer containing the number of matching events.
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_events">
query_events</a><pre class="autodocfuncdef">
string * query_events()
</pre><dd><br />
Answer the list of all possible events.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />array of all event types recognized by the playerinfo handler
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_interleaved">
query_interleaved</a><pre class="autodocfuncdef">
string query_interleaved(object source,
                         string player,
                         string event)
</pre><dd><br />
Print all entries for this player and all alts, in chronological order.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
source - the creator who requested the report<br />
player - the name of the player
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_name">
query_name</a><pre class="autodocfuncdef">
string query_name()
</pre>
<dt class="autodocfuncname"><a name="query_online_alerts">
query_online_alerts</a><pre class="autodocfuncdef">
string * query_online_alerts()
</pre><dd><br /><br />
<br /><dl>
<dd><b>Returns:</b>
<br />A list of the currently-online players who have unacknowledged alerts
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_source_ok">
query_source_ok</a><pre class="autodocfuncdef">
int query_source_ok(string event,
                    string source)
</pre><dd><br />
Check if the event has come from the valid source.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
event - the name of the event<br />
source - the object trying to add the event<br />
<br />
<dd><b>Returns:</b>
<br />nonzero if the event can be added by the given source
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_timeouts">
query_timeouts</a><pre class="autodocfuncdef">
mapping query_timeouts()
</pre>
<dt class="autodocfuncname"><a name="reregister_parent">
reregister_parent</a><pre class="autodocfuncdef">
void reregister_parent(string player)
</pre>
<dt class="autodocfuncname"><a name="save_handler_data">
save_handler_data</a><pre class="autodocfuncdef">
void save_handler_data()
</pre>
</dl>
<h2>Protected Functions</h2>
These are functions that only objects inheriting the class can access.<p>
<dl>
<dt class="autodocfuncname"><a name="query_deleter_ok">
query_deleter_ok</a><pre class="autodocfuncdef">
int query_deleter_ok(string event,
                     object deleter)
</pre><dd><br />
Check if the request to delete an event came from the valid source.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
event - the name of the event<br />
remover - the object that tries to remove the event
<br />
<br />
<br /></dl>

</dl>
<h2>Classes</h2>
These are nice data types for dealing with...  Data!<p>
<ul>
<li><a name="class_source">
source</a><pre>
class source {
               string * add;
               string * delete;
}

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

