Crossfire Server, Branches 1.12
R18729
|
Go to the source code of this file.
Functions | |
int | command_gsay (object *op, char *params) |
int | command_party (object *op, char *params) |
int | command_party_rejoin (object *op, char *params) |
int | confirm_party_password (object *op) |
partylist * | form_party (object *op, const char *params) |
partylist * | get_firstparty (void) |
void | obsolete_parties (void) |
static void | party_help (object *op) |
void | receive_party_password (object *op) |
void | remove_party (partylist *target_party) |
void | send_party_message (object *op, char *msg) |
Variables | |
static partylist * | firstparty = NULL |
static partylist * | lastparty = NULL |
static const char * | rejoin_modes [] |
Party-related functions and variables.
Definition in file c_party.c.
int command_gsay | ( | object * | op, |
char * | params | ||
) |
'gsay' command, talks to party.
op | player. |
params | message. |
Definition at line 304 of file c_party.c.
References command_party(), draw_ext_info(), MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, and NDI_UNIQUE.
int command_party | ( | object * | op, |
char * | params | ||
) |
'party' command, subdivided in different sub commands.
op | player. |
params | additional parameters. 1. |
Definition at line 350 of file c_party.c.
References obj::contr, draw_ext_info(), draw_ext_info_format(), first_player, firstparty, form_party(), get_party_password(), party_struct::kills, list_players(), MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMAND_SUCCESS, MSG_TYPE_COMMUNICATION, MSG_TYPE_COMMUNICATION_PARTY, obj::name, NDI_UNIQUE, NDI_WHITE, party_struct::next, pl::next, pl::party, party_help(), party_struct::partyleader, party_struct::partyname, party_struct::passwd, remove_party(), replace_unprintable_chars(), send_party_message(), snprintf(), and party_struct::total_exp.
Referenced by command_gsay().
int command_party_rejoin | ( | object * | op, |
char * | params | ||
) |
Handles the 'party_rejoin' command.
op | player. |
params | optional parameters. |
Definition at line 688 of file c_party.c.
References obj::contr, draw_ext_info_format(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMAND_SUCCESS, NDI_UNIQUE, and pl::rejoin_party.
int confirm_party_password | ( | object * | op | ) |
Is the password the player entered to join a party the right one?
op | player. Must have party_to_join correctly set. |
0 | password is correct. |
1 | invalid password or party not found. |
Definition at line 228 of file c_party.c.
References obj::contr, party_struct::next, pl::party_to_join, party_struct::partyname, party_struct::passwd, and pl::write_buf.
Referenced by receive_party_password().
Forms the party struct for a party called 'params'. 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. |
params | party name. |
Definition at line 65 of file c_party.c.
References obj::contr, draw_ext_info_format(), firstparty, party_struct::kills, MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_SUCCESS, obj::name, NDI_UNIQUE, party_struct::next, pl::party, party_struct::partyleader, party_struct::partyname, party_struct::passwd, replace_unprintable_chars(), send_party_message(), snprintf(), strdup_local(), and party_struct::total_exp.
Referenced by check_login(), command_party(), and START_TEST().
partylist* get_firstparty | ( | void | ) |
Simple wrapper to get firstparty.
Definition at line 48 of file c_party.c.
References firstparty.
Referenced by cfapi_party_get_property(), check_login(), and START_TEST().
void obsolete_parties | ( | void | ) |
Remove unused parties (no players), this could be made to scale a lot better.
Definition at line 165 of file c_party.c.
References first_player, party_struct::next, pl::next, pl::party, and remove_party().
Referenced by do_specials(), and START_TEST().
|
static |
Give help for party commands.
op | player. |
Definition at line 323 of file c_party.c.
References draw_ext_info(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_HELP, and NDI_UNIQUE.
Referenced by command_party().
void receive_party_password | ( | object * | op | ) |
Player entered a party password.
op | player. |
Definition at line 248 of file c_party.c.
References confirm_party_password(), obj::contr, draw_ext_info(), draw_ext_info_format(), MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMAND_SUCCESS, obj::name, NDI_UNIQUE, pl::party, pl::party_to_join, party_struct::partyname, send_party_message(), snprintf(), ST_PLAYING, and pl::state.
Referenced by reply_cmd().
void remove_party | ( | partylist * | target_party | ) |
Remove and free party.
target_party | party to remove. |
Definition at line 106 of file c_party.c.
References first_player, llevError, LOG(), party_struct::next, pl::next, pl::party, party_struct::partyleader, and party_struct::partyname.
Referenced by command_party(), obsolete_parties(), and START_TEST().
void send_party_message | ( | object * | op, |
char * | msg | ||
) |
Send a message to all party members except the speaker.
op | player talking. |
msg | message to send. |
Definition at line 285 of file c_party.c.
References obj::contr, draw_ext_info(), first_player, MSG_TYPE_COMMUNICATION, MSG_TYPE_COMMUNICATION_PARTY, NDI_WHITE, pl::next, pl::ob, and pl::party.
Referenced by check_login(), command_party(), form_party(), and receive_party_password().
|
static |
Keeps track of first party in list
Definition at line 40 of file c_party.c.
Referenced by command_party(), form_party(), and get_firstparty().
|
static |