Crossfire Server  1.75.0
c_party.cpp File Reference

Party-related functions and variables. More...

#include "global.h"
#include <string.h>
#include "sproto.h"
#include "spells.h"

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...
 
static int confirm_party_password (object *op, const char *password)
 Is the password the player entered to join a party the right one? More...
 
void receive_party_password (object *op, const char *password)
 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.cpp.

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.cpp.

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

Referenced by commands_init().

◆ command_party()

void command_party ( object op,
const char *  params 
)

◆ 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.cpp.

References object::contr, draw_ext_info_format(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMAND_SUCCESS, NDI_UNIQUE, rejoin_modes, and player::rejoin_party.

Referenced by commands_init().

◆ 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.cpp.

References object::contr, party_confirm_password(), party_find(), player::party_to_join, and partylist::partyname.

Referenced by receive_party_password().

◆ 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.cpp.

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

Referenced by reply_cmd().

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.cpp.

Referenced by command_party_rejoin().