[Package Index | Mudlib Index | Effect Index]

File /obj/handlers/player_handler.c

A hander to allow the testing of values on players when they aren't logged in. These methods used to exist in the login object but now they're here.

Written by Ceres

Inherits

This class inherits the following classes /global/family.c, /global/options_control.c and /std/living/nationality.c

Includes

This class includes the following files /include/player.h, /include/cmds/import.h, /include/playtesters.h, /include/login_handler.h, /include/player_handler.h, /include/access.h, /include/alias.h and /include/cmds/friends.h

Class Index

Method index

Public Functions

These are functions that everyone can access.

clean_cache
void clean_cache()
living_mxp_commands
string living_mxp_commands()

This function returns the list of commands available to use in an mxp way on a living/player.

Returns:
the mxp commands


load_player
int load_player(string name)

This method will load in the player file. It will return 0 if the player file either does not exist or the input string is incorrect.

Parameters:
name - the name to try and read in

Returns:
1 if the player file exists, 0 if not


make_string
string make_string(mixed * al,
                   int max)

This method converts an alias into a string. This is used by the projects and plans and so on.

Parameters:
al - the alias to turn into a string

Returns:
the converted string


my_find_player
object my_find_player(string player)
query_appeal_player_file_name
string query_appeal_player_file_name(string name)

This method returns the path to the pending appeal player file. This is the appeal player files actual normal location, it was written to allow moving the player files around easier.

Parameters:
name - the name of the player whose file to find

See also:
test_user() and query_delete_player_file_name()


query_cap_name
string query_cap_name(string str)

This method returns a players cap_name.

Parameters:
str - the name of the user

Returns:
the players cap name


query_delete_player_file_name
string query_delete_player_file_name(string name)

This method returns the path to the deleted player file. This is the deleted player files actual normal location, it was written to allow moving the player files around easier.

Parameters:
name - the name of the player whose file to find

See also:
test_user() and query_delete_player_file_name()


query_guild_data
mixed query_guild_data()

This method is called by query_level() in the base guild inheritable to determine the specialisation of the current player.
query_pk_stats
string query_pk_stats()
query_plan
string query_plan(string name,
                  int unused)

This method returns the players .plan even when they are off line.

Parameters:
name - the name of the player

Returns:
the plan, "" if none


query_player_disk_file_name
string query_player_disk_file_name(string name)
query_player_file_name
string query_player_file_name(string name)

This method returns the path to the player file. This is the player files actual normal location, it was written to allow moving the player files around easier.

Parameters:
name - the name of the player whose file to find

See also:
test_user() and query_delete_player_file_name()


query_player_ram_file_name
string query_player_ram_file_name(string name)
query_prevent_shadow
nomask int query_prevent_shadow(object ob)
query_project
string query_project(string name,
                     int unused)

This method returns the players .project even when they are off line.

Parameters:
name - the name of the player

Returns:
the project, "" if none


query_reference
string query_reference(string name)

This method returns the players .reference even when they are off line.

Parameters:
name - the name of the player

Returns:
the reference, "" if none


query_signature
string query_signature(string name)

This method returns the signature to use on posts for the player even when they are off line.

Parameters:
name - the name of the player

Returns:
the signature, "" if none


query_skill
int query_skill(string skill)
remove_cache_entry
void remove_cache_entry(string name)
special_add_property
int special_add_property(string pname,
                         string prop,
                         mixed val)

This method updates the cached properties, it's called by /secure/login.
test_active
varargs int test_active(string player,
                        int noload,
                        int alwayscheck)

This method determines if a player is still active. If you need to perform this on a lot of players please use the noload parameter. When noload is set to 1 test_active will not attempt to load the player file if it isn't currently loaded and will instead just do a simple calculation of the players last login time. This is less accurate but avoids lagging the mud.

Parameters:
player - the name of the user
noload - optional parameter to prevent test_active() loading the player file.
alwayscheck - optional parameter to cause the system to check even if the player is logged in.

Returns:
active or inactive (1 or 0)


test_age
int test_age(string word)

This method determines the age of the player even if they are not currently on.

Parameters:
str - the name of the user

Returns:
the players age


test_aliases
mapping test_aliases(string str)

This method determines the aliases the player has set even if they are not currently on.

Parameters:
str - the name of the user

Returns:
the player's aliases


test_appealing
int test_appealing(string str)

This method figures out if the user is marked for deletion pending appeal.

Parameters:
str - the name of the user

Returns:
1 if they are marked for deletion, 0 if they do not


test_banished
int test_banished(string name)

This method checks to see if the name is banished of not.

Parameters:
name - the check for banishment.

Returns:
1 if it banished, 0 if not


test_birthday
string test_birthday(string str)

This method determines the birthday of the player even if they are not currently on

Parameters:
str - the name of the user

Returns:
the players birthday (if set)


test_creator
int test_creator(string str)

This method determines if the player is a creator.

Parameters:
str - the name of the user

Returns:
the player to test

See also:
test_last(), test_user() and test_creator()


test_deity
string test_deity(string word)

This method determines the deity of the player even if they are not currently on.

Parameters:
str - the name of the user

Returns:
the players deity


test_deleting
int test_deleting(string str)

This method figures out if the user is marked for deletion.

Parameters:
str - the name of the user

Returns:
1 if they are marked for deletion, 0 if they do not


test_desc
string test_desc(string str)

This method determines the description of the player even if they are not currently on

Parameters:
str - the name of the user

Returns:
the players description


test_email
string test_email(string str)

This method determines the email of the player even if they are not currently on.

Parameters:
str - the name of the user

Returns:
the players email


test_family
string test_family(string str)

This method returns the players family name

Parameters:
str - the name of the user

Returns:
the family name


test_friends
mapping test_friends(string str)

This method determines the friends of the player has set even if they are not currently on.

Parameters:
str - the name of the user

Returns:
the player's friends


test_gender
int test_gender(string str)

This method determines the gender of the player even if they are not currently on

Parameters:
str - the name of the user

Returns:
the players gender

See also:
/std/living/gender.c


test_guild
string test_guild(string word)

This method determines the guild of the player even if they are not currently on.

Parameters:
str - the name of the user

Returns:
the players guild


test_guild_data
mixed * test_guild_data(string word)

This method determines the guild data of the player even if they are not currently on.

Parameters:
str - the name of the user

Returns:
the players guild data


test_home_dir
string test_home_dir(string str)

This method returns the players home directory

Parameters:
str - the name of the user

Returns:
the player to test


test_homepage
string test_homepage(string str)

This method determines the players homepage information even if they are not currently on

Parameters:
str - the name of the user

Returns:
the players location


test_ip_allowed
int test_ip_allowed(string name,
                    string ip)

Check if a players personal allow list permits logins from this IP

Parameters:
name - The player name.
ip - The IP address.


test_last
int test_last(string word,
              int noload)

This method determines the last log on of the player even if they are not currently on.

Parameters:
str - the name of the user

Returns:
the players last log on


test_last_on_from
string test_last_on_from(string word)

This method determines the last log on of the player even if they are not currently on.

Parameters:
str - the name of the user

Returns:
the players last log on


test_level
int test_level(string str)

This method determines the level of the player even if they are not currently on

Parameters:
str - the name of the user

Returns:
the players level

See also:
/std/living/gender.c


test_local_time_zone
mixed * test_local_time_zone(string name)

Check a players local time zone.

Parameters:
name - The player name.
ip - The IP address.


test_location
string test_location(string str)

This method determines the players location finger information even if they are not currently on

Parameters:
str - the name of the user

Returns:
the players location


test_my_colours
mapping test_my_colours(string str)

This method determines the colours mapping of the specfied player

Parameters:
str - the name of the user

Returns:
the players colour mapping

See also:
/std/living/gender.c


test_nationality
string test_nationality(string str)

This method returns the players nationality.

Parameters:
str - the name of the user

Returns:
the nationality


test_nationality_data
string test_nationality_data(string str)

This method returns the players nationality data.

Parameters:
str - the name of the user

Returns:
the nationality data


test_nationality_region
string test_nationality_region(string str)

This method returns the players nationality region.

Parameters:
str - the name of the user

Returns:
the nationality region


test_nicknames
mapping test_nicknames(string str)

This method determines the nicknames the player has set even if they are not currently on.

Parameters:
str - the name of the user

Returns:
the player's nicknames


test_player_killer
mixed test_player_killer(string word,
                         string str)

This method returns the current value of the player flag on the player, even if they are not currently on.

Parameters:
word - the player name

Returns:
1 if they are a player killer, 0 if not


test_player_title
string test_player_title(string str)

This method returns the players title.

Parameters:
str - the name of the user

Returns:
the title


test_property
mixed test_property(string word,
                    string str)

This method returns the current value of the property on the player, even if they are not currently on.

Parameters:
word - the player name
str - the property to query

Returns:
the value of the property


test_real_name
string test_real_name(string str)

This method determines the real name of the player even if they are not currently on

Parameters:
str - the name of the user

Returns:
the players real name

See also:
/std/living/gender.c


test_start_time
int test_start_time(string word)

This method determines the time the player started at.

Parameters:
str - the name of the user

Returns:
the players last log on


test_user
int test_user(string str)

This method figures out if the user exists even if they are not on.

Parameters:
str - the name of the user

Returns:
1 if they exist, 0 if they do not


test_valid
varargs int test_valid(string name)

Validate a name by checking if it, or bits of it are banished.

Parameters:
name - The name to be validated.
full - Should we do full checks or just the basics.

Returns:
1 if it's ok, 0 if not.


Classes

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