[Package Index | Mudlib Index | Effect Index]

File /obj/handlers/playerinfo.c

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.

Written by Fiona

Inherits

This class inherits the following classes /std/object.c

Includes

This class includes the following files /include/refresh.h, /include/applications.h, /include/newbiehelpers.h, /include/player_handler.h and /include/playerinfo.h

Class Index

Method index

Public Functions

These are functions that everyone can access.

acknowledge_alert
int acknowledge_alert(object creator,
                      string player,
                      string event,
                      int idx,
                      string update,
                      mixed * extra)
add_alt
string add_alt(object creator,
               string player,
               string alt)

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.

Parameters:
player - the name of the player
alts - the names of the alt characters to add

Returns:
a string describing the outcome of the function call


add_alts
string add_alts(object creator,
                string player,
                string * alts)

Adds an array of alts from this player's dossier. Note that both players have their dossier modified.

Parameters:
player - the name of the player
alts - the name of the alt characters to delete

Returns:
a string describing the outcome of the function call


add_entry
int add_entry(object creator,
              string player,
              string event,
              string comment,
              mixed * extra)

Add a new entry to the player's database.

Parameters:
source - the creator or another object trying to add the event
player - the name of the player
event - event the name of the event to be added
comment - arbitrary comment text (more than one line is OK)
extra - arbitrary array of arbitrary objects (can be 0)

Returns:
nonzero if the entry was successfully added to the database


clear_alerts_for
void clear_alerts_for(string player)



Parameters:
player - The name of the player.


decrement_alerts_for
int decrement_alerts_for(string player)



Parameters:
player - The name of the player.

Returns:
The updated number of alerts for that player.


delete_alt
string delete_alt(object creator,
                  string player,
                  string alt)

Delete an alt character name from this player's dossier. Note that both players have their dossier modified.

Parameters:
player - the name of the player
alts - the name of the alt characters to delete

Returns:
a string describing the outcome of the function call


delete_alts
string delete_alts(object creator,
                   string player,
                   string * alts)

Delete an array of alts from this player's dossier. Note that both players have their dossier modified.

Parameters:
player - the name of the player
alts - the name of the alt characters to delete

Returns:
a string describing the outcome of the function call


delete_entry
int delete_entry(object creator,
                 string player,
                 string event,
                 int n)

Delete an entry from the playerinfo database.

Parameters:
source - the creator or another object trying to add the event
player - the name of the player
event - the name of the event of the entry being deleted
n - the index of the entry being deleted

Returns:
nonzero if the entry was successfully deleted


increment_alerts_for
int increment_alerts_for(string player)



Parameters:
player - The name of the player.

Returns:
The updated number of alerts for that player.


is_alert
int is_alert(string player,
             int idx)



Parameters:
player - The name of the player
idx - The number of the event to check for alert status.

Returns:
0 if the event is not an alert, 1 if it is.


load_handler_data
void load_handler_data()
player_remove
void player_remove(string player)

Remove the player's data file.

Parameters:
player - the name of the player


query_access_history
string query_access_history(string player)
query_alerts
mapping query_alerts()

@return The alerts mapping.
query_alerts_for
int query_alerts_for(string player)



Parameters:
player - Name of the player to query

Returns:
The number of alerts for that player


query_all_alts
varargs string * query_all_alts(string player,
                                int inclusive)

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
query_alt_of
string query_alt_of(string player)

Return which player this player is an alt of (if any). param player A players name return the name of the players main alt.
query_alts
string * query_alts(string player)
query_dossier
varargs string query_dossier(object source,
                             string player,
                             int lastn)

Print all entries from the given player's dossier.

Parameters:
source - the creator who requested the report
player - the name of the player


query_event
string query_event(object source,
                   string player,
                   string event)

Print all entries from the given player's dossier with the given event type.

Parameters:
source - the creator who requested the report
player - the name of the player
event - the name of the event


query_event_count
int query_event_count(object creator,
                      string player,
                      string event)

Get a count of the total number of event types. This will exclude "lockouts" from "suspend" requests.

Parameters:
source - the person (may be a playtester or a creator) who requested the count
event - the event they wish to tally.
player - the name of the player to check.

Returns:
an integer containing the number of matching events.


query_events
string * query_events()

Answer the list of all possible events.

Returns:
array of all event types recognized by the playerinfo handler


query_interleaved
string query_interleaved(object source,
                         string player,
                         string event)

Print all entries for this player and all alts, in chronological order.

Parameters:
source - the creator who requested the report
player - the name of the player


query_name
string query_name()
query_online_alerts
string * query_online_alerts()



Returns:
A list of the currently-online players who have unacknowledged alerts


query_source_ok
int query_source_ok(string event,
                    string source)

Check if the event has come from the valid source.

Parameters:
event - the name of the event
source - the object trying to add the event

Returns:
nonzero if the event can be added by the given source


query_timeouts
mapping query_timeouts()
reregister_parent
void reregister_parent(string player)
save_handler_data
void save_handler_data()

Protected Functions

These are functions that only objects inheriting the class can access.

query_deleter_ok
int query_deleter_ok(string event,
                     object deleter)

Check if the request to delete an event came from the valid source.

Parameters:
event - the name of the event
remover - the object that tries to remove the event


Classes

These are nice data types for dealing with... Data!