Crossfire Server, Trunk
c_party.c File Reference
#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)
 
void command_party (object *op, const char *params)
 
void command_party_rejoin (object *op, const char *params)
 
static int confirm_party_password (object *op, const char *password)
 
void receive_party_password (object *op, const char *password)
 

Variables

static const char * rejoin_modes []
 

Detailed Description

Party-related functions and variables.

Definition in file c_party.c.

Function Documentation

◆ command_gsay()

void command_gsay ( object op,
const char *  params 
)

'gsay' command, talks to party.

Parameters
opplayer.
paramsmessage.

Definition at line 75 of file c_party.c.

References command_party(), draw_ext_info(), MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, give::op, and manor::params.

Referenced by commands_init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ command_party()

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 97 of file c_party.c.

References buf, command_help(), draw_ext_info(), draw_ext_info_format(), get_party_password(), list_players(), say::max, MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMAND_SUCCESS, MSG_TYPE_COMMUNICATION, MSG_TYPE_COMMUNICATION_PARTY, NDI_UNIQUE, NDI_WHITE, give::op, manor::params, party_find(), party_form(), party_get_first(), party_get_leader(), party_get_next(), party_get_password(), party_join(), party_leave(), party_send_message(), party_set_password(), and party_struct::partyname.

Referenced by command_gsay(), and commands_init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ command_party_rejoin()

void command_party_rejoin ( object op,
const char *  params 
)

Handles the 'party_rejoin' command.

Parameters
opplayer.
paramsoptional parameters.

Definition at line 307 of file c_party.c.

References draw_ext_info_format(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMAND_SUCCESS, NDI_UNIQUE, give::op, manor::params, and rejoin_modes.

Referenced by commands_init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ confirm_party_password()

static int confirm_party_password ( object op,
const char *  password 
)
static

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

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

Definition at line 38 of file c_party.c.

References give::op, party_confirm_password(), and party_find().

Referenced by receive_party_password().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ receive_party_password()

void receive_party_password ( object op,
const char *  password 
)

Player entered a party password.

Parameters
opplayer.
passwordparty password.

Definition at line 53 of file c_party.c.

References confirm_party_password(), draw_ext_info(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, give::op, party_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

◆ rejoin_modes

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 293 of file c_party.c.

Referenced by command_party_rejoin().