Crossfire Server, Trunk
|
Go to the source code of this file.
Functions | |
int | party_confirm_password (const partylist *party, const char *password) |
partylist * | party_find (const char *partyname) |
partylist * | party_form (object *op, const char *partyname) |
partylist * | party_get_first (void) |
const char * | party_get_leader (const partylist *party) |
partylist * | party_get_next (const partylist *party) |
const char * | party_get_password (const partylist *party) |
void | party_join (object *op, partylist *party) |
void | party_leave (object *op) |
void | party_obsolete_parties (void) |
void | party_remove (partylist *party) |
void | party_send_message (object *op, const char *message) |
void | party_set_password (partylist *party, const char *password) |
static void | remove_if_unused (partylist *party) |
Variables | |
static partylist * | firstparty = NULL |
static partylist * | lastparty = NULL |
Party-structure related functions.
Definition in file party.cpp.
int party_confirm_password | ( | const partylist * | party, |
const char * | password | ||
) |
Checks whether a given password matches the party's password.
party | the party to check |
password | the password to check for |
Definition at line 259 of file party.cpp.
References partylist::passwd.
Referenced by check_login(), and confirm_party_password().
partylist* party_find | ( | const char * | partyname | ) |
Find a party by name.
partyname | the party's name to find |
Definition at line 148 of file party.cpp.
References firstparty, partylist::next, and partylist::partyname.
Referenced by check_login(), command_party(), confirm_party_password(), and party_form().
Forms the party struct for a party called 'partyname'. it is the responsibility of the caller to ensure that the name is unique. New item is placed on the party list.
op | party creator. |
partyname | the party name. |
Definition at line 40 of file party.cpp.
References buf, draw_ext_info_format(), firstparty, lastparty, MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_SUCCESS, NDI_UNIQUE, partylist::next, give::op, party_find(), party_leave(), partylist::partyleader, partylist::partyname, partylist::passwd, replace_unprintable_chars(), strdup_local, and strlcpy().
Referenced by check_login(), command_party(), and START_TEST().
partylist* party_get_first | ( | void | ) |
Returns the first party from the list of all parties.
Definition at line 196 of file party.cpp.
References firstparty.
Referenced by cfapi_party_get_property(), cfapi_system_get_party_vector(), command_party(), and START_TEST().
const char* party_get_leader | ( | const partylist * | party | ) |
Returns the name of the party's leader.
party | the party to query |
Definition at line 292 of file party.cpp.
References partylist::partyleader.
Referenced by command_party(), and START_TEST().
Returns the next party from the list of all parties.
party | the party to use |
Definition at line 208 of file party.cpp.
References partylist::next.
Referenced by cfapi_party_get_property(), cfapi_system_get_party_vector(), command_party(), and START_TEST().
const char* party_get_password | ( | const partylist * | party | ) |
Returns the party's password.
party | the party to query |
Definition at line 232 of file party.cpp.
References partylist::passwd.
Referenced by cfapi_party_get_property(), command_party(), get_party_password(), and save_player().
Makes a player join a party. Leaves the former party if necessary. Does nothing if the player already is a member of the party.
op | the player |
party | the party to join |
Definition at line 85 of file party.cpp.
References buf, draw_ext_info_format(), MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMAND_SUCCESS, NDI_UNIQUE, give::op, party_leave(), party_send_message(), and partylist::partyname.
Referenced by cfapi_object_set_property(), check_login(), command_party(), and receive_party_password().
void party_leave | ( | object * | op | ) |
Makes a player leave his party. Does nothing if the player is not member of a party.
op | the player |
Definition at line 123 of file party.cpp.
References buf, draw_ext_info_format(), MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_SUCCESS, NDI_UNIQUE, give::op, party_send_message(), partylist::partyname, and remove_if_unused().
Referenced by apply_savebed(), command_party(), key_confirm_quit(), kill_player_permadeath(), leave(), party_form(), and party_join().
void party_obsolete_parties | ( | void | ) |
Remove unused parties (no players).
Definition at line 215 of file party.cpp.
References firstparty, partylist::next, give::next, and remove_if_unused().
Referenced by do_specials(), and START_TEST().
void party_remove | ( | partylist * | party | ) |
Removes and frees a party. Removes all members from the party.
party | the party to remove |
Definition at line 164 of file party.cpp.
References first_player, firstparty, lastparty, llevError, LOG(), partylist::next, partylist::partyleader, partylist::partyname, and altar_valkyrie::pl.
Referenced by remove_if_unused(), and START_TEST().
void party_send_message | ( | object * | op, |
const char * | message | ||
) |
Send a message to all party members except the speaker.
op | player talking. |
message | message to send. |
Definition at line 274 of file party.cpp.
References draw_ext_info(), first_player, diamondslots::message, MSG_TYPE_COMMUNICATION, MSG_TYPE_COMMUNICATION_PARTY, NDI_WHITE, give::op, and altar_valkyrie::pl.
Referenced by command_party(), party_join(), and party_leave().
void party_set_password | ( | partylist * | party, |
const char * | password | ||
) |
Sets a party's password.
party | the party to change |
password | the new password to set |
Definition at line 244 of file party.cpp.
References partylist::passwd, replace_unprintable_chars(), and strlcpy().
Referenced by check_login(), and command_party().
|
static |
Remove party if it has no players.
Definition at line 108 of file party.cpp.
References first_player, party_remove(), and altar_valkyrie::pl.
Referenced by party_leave(), and party_obsolete_parties().
|
static |
Keeps track of first party in list
Definition at line 26 of file party.cpp.
Referenced by party_find(), party_form(), party_get_first(), party_obsolete_parties(), and party_remove().
|
static |
Keeps track of last party in list
Definition at line 27 of file party.cpp.
Referenced by party_form(), and party_remove().