[Package Index | Mudlib Index | Effect Index]

File /global/communicate.c

The communication handling code for the player object. Controls all the basic channels and basic communication stuff.

Written by Pinkfish

Includes

This class includes the following files /include/language.h, /include/drinks.h, /include/playtesters.h, /include/player.h and /include/library.h

Class Index

Method index

Public Functions

These are functions that everyone can access.

add_ignore
void add_ignore(string user,
                string reason,
                int num_hours)

Adds someone to the ignore list for the specific person with the reason and the number of hours the ignore lasts for.

Parameters:
user - the user to add
reason - the reason to ignore
num_hours - the number of hours to ignore for


add_language
void add_language(string lang)

This method will add a language to a player/npc. It is used to make sure that a player or npc has a specific language.

Parameters:
lang - the language to add


adjust_max_sp
int adjust_max_sp(int number)

This method adjusts the current maximum social points.

Parameters:
number - the amount to adjust it by

Returns:
the new maximum social points


adjust_sp
int adjust_sp(int number)

This method changes the current number of social points

Parameters:
number - the amount to change the social points by

Returns:
the current social points


comm_event
void comm_event(mixed thing,
                string type,
                string start,
                string rest,
                string lang,
                string accent)
comm_event_to
void comm_event_to(object ob,
                   string event_type,
                   string start,
                   string type,
                   string words,
                   object * others,
                   string lang,
                   object me,
                   string accent)
communicate_commands
void communicate_commands()
do_converse
void do_converse(string str)
do_whisper
void do_whisper(object ob,
                string event_type,
                string start,
                string type,
                string words,
                object * others,
                string lang,
                object me,
                string accent)
is_ignoring
int is_ignoring(string user)

FIgures out if the user is being ignored.

Parameters:
user - the user to ignore

Returns:
1 if the user is ignore, 0 if not.


query_all_ignoring
string * query_all_ignoring()

THis method returns all the peopel we are ignoring.

Returns:
the list of people we are ignoring


query_current_language
string query_current_language()

This method returns the language the person is currently speaking.

Returns:
the spoken language

See also:
set_language()


query_default_language
string query_default_language()

This method returns the default language to use for the person.

Returns:
the default language


query_ignore_reason
string query_ignore_reason(string user)

Returns the reason the user was ignored for.

Parameters:
user - the uset to find the reason for

Returns:
the reason


query_ignore_time_left
int query_ignore_time_left(string user)

This figures out how much time is left before the user expires from the ignore list.

Parameters:
user - the user to find the time left for

Returns:
the time left (0 if this is not being timed)


query_ignored_by
object * query_ignored_by(object * people)

This method returns the people in the array who are ignoring this player.

Parameters:
people - the people to check to see for ignoring

Returns:
the array of people that are ignoring this player

See also:
query_ignoring()


query_ignoring
object * query_ignoring(object * people)

This method returns the people in the array who this player is currently ignoring.

Parameters:
people - the people to check to see if they are being ignored

Returns:
the people who are being ignored from the array

See also:
query_ignored_by()


query_mangle_accent
int query_mangle_accent()

This method returns the mangle accents flag. If this is set to 1 then the accents will be mangled in the speech text, if it is set to 0 then the accent will just be added to the say string instead.

Returns:
the mangle accent flag


query_max_sp
int query_max_sp()

This returns the maximum number of social points available.

Returns:
the maximum social points


query_real_max_sp
int query_real_max_sp()
query_sp
int query_sp()

This method returns the current social points.

Returns:
the current social points


query_tell_reply_list
mixed query_tell_reply_list()

This method returns the players tell reply list.

Returns:
the tell reply list.


remove_ignore
void remove_ignore(string user)

Removes someone from the ignore list.

Parameters:
user - the user to remove


set_default_language
void set_default_language(string def)

This method sets the default language to use for the person. The default language is their native tongue, so things in this language show as not being a special language.

Parameters:
def - the default language


set_language
int set_language(string str)

This method sets the language we are currently speaking.

Parameters:
str - the language we are current speaking

See also:
query_current_language()


set_mangle_accent
void set_mangle_accent(int flag)

This method sets the mangle accents flag. If this is set to 1 then the accents will be mangled in the speech text, if it is set to 0 then the accent will just be added to the say string instead.

Parameters:
flag - the new value of the flag


set_max_sp
int set_max_sp(int number)

This method sets the maximum social points.

Parameters:
number - the maxmum social points

Returns:
the new maximum social points


set_sp
int set_sp(int number)

This method sets the current social points for the player

Parameters:
number - the number of social points


set_tell_reply_list
int set_tell_reply_list(mixed list)

This method sets the players tell reply list.

Parameters:
list - the reply list.
tim - the timeout


Protected Functions

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

do_wombat_repeat
int do_wombat_repeat(string str,
                     string com)

Classes

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