Crossfire Server, Trunk  R20513
Functions | Variables
c_party.c File Reference

Party-related functions and variables. More...

#include "global.h"
#include <string.h>
#include "sproto.h"
#include "spells.h"
Include dependency graph for c_party.c:

Go to the source code of this file.

Functions

void command_gsay (object *op, const char *params)
 'gsay' command, talks to party. More...
 
void command_party (object *op, const char *params)
 'party' command, subdivided in different sub commands. More...
 
void command_party_rejoin (object *op, const char *params)
 Handles the 'party_rejoin' command. More...
 
int confirm_party_password (object *op)
 Is the password the player entered to join a party the right one? More...
 
static void party_help (object *op)
 Give help for party commands. More...
 
void receive_party_password (object *op)
 Player entered a party password. More...
 

Variables

static const char * rejoin_modes []
 Valid modes for 'party_rejoin', indexed by party_rejoin_mode. More...
 

Detailed Description

Party-related functions and variables.

Definition in file c_party.c.

Function Documentation

void command_gsay ( object op,
const char *  params 
)

'gsay' command, talks to party.

Parameters
opplayer.
paramsmessage.

Definition at line 71 of file c_party.c.

References command_party(), draw_ext_info(), MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, and NDI_UNIQUE.

Here is the call graph for this function:

void command_party ( object op,
const char *  params 
)

'party' command, subdivided in different sub commands.

Parameters
opplayer.
paramsadditional parameters. 1.
Todo:
split in different functions. clean the 'form' mess.

Definition at line 116 of file c_party.c.

References obj::contr, draw_ext_info(), draw_ext_info_format(), get_party_password(), 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, pl::party, party_find(), party_form(), party_get_first(), party_get_leader(), party_get_next(), party_get_password(), party_help(), party_join(), party_leave(), party_send_message(), party_set_password(), party_struct::partyname, and snprintf.

Referenced by command_gsay().

Here is the call graph for this function:

Here is the caller graph for this function:

void command_party_rejoin ( object op,
const char *  params 
)

Handles the 'party_rejoin' command.

Parameters
opplayer.
paramsoptional parameters.

Definition at line 333 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, rejoin_modes, and pl::rejoin_party.

Here is the call graph for this function:

int confirm_party_password ( object op)

Is the password the player entered to join a party the right one?

Parameters
opplayer. Must have party_to_join correctly set.
Return values
0password is correct.
1invalid password or party not found.

Definition at line 36 of file c_party.c.

References obj::contr, party_confirm_password(), party_find(), pl::party_to_join, party_struct::partyname, and pl::write_buf.

Referenced by receive_party_password().

Here is the call graph for this function:

Here is the caller graph for this function:

static void party_help ( object op)
static

Give help for party commands.

Parameters
opplayer.

Definition at line 89 of file c_party.c.

References draw_ext_info(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_HELP, and NDI_UNIQUE.

Referenced by command_party().

Here is the call graph for this function:

Here is the caller graph for this function:

void receive_party_password ( object op)

Player entered a party password.

Parameters
opplayer.

Definition at line 49 of file c_party.c.

References confirm_party_password(), obj::contr, draw_ext_info(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, party_join(), pl::party_to_join, player_set_state(), and ST_PLAYING.

Referenced by reply_cmd().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

const char* rejoin_modes[]
static
Initial value:
= {
"no",
"if_exists",
"always",
NULL
}

Valid modes for 'party_rejoin', indexed by party_rejoin_mode.

Definition at line 319 of file c_party.c.

Referenced by command_party_rejoin().