Crossfire Server, Trunk
c_chat.c File Reference
#include "global.h"
#include <stdlib.h>
#include <string.h>
#include "loader.h"
#include "sproto.h"
+ Include dependency graph for c_chat.c:

Go to the source code of this file.

Macros

#define DICE   4
 
#define EMOTE_ACCUSE   18
 
#define EMOTE_BEG   51
 
#define EMOTE_BLEED   52
 
#define EMOTE_BLUSH   22
 
#define EMOTE_BOUNCE   4
 
#define EMOTE_BOW   20
 
#define EMOTE_BURP   23
 
#define EMOTE_CACKLE   6
 
#define EMOTE_CHUCKLE   24
 
#define EMOTE_CLAP   21
 
#define EMOTE_COUGH   25
 
#define EMOTE_CRINGE   53
 
#define EMOTE_CRY   16
 
#define EMOTE_DANCE   2
 
#define EMOTE_FIRST   0
 
#define EMOTE_FLIP   26
 
#define EMOTE_FROWN   27
 
#define EMOTE_GASP   28
 
#define EMOTE_GIGGLE   8
 
#define EMOTE_GLARE   29
 
#define EMOTE_GRIN   19
 
#define EMOTE_GROAN   30
 
#define EMOTE_GROWL   11
 
#define EMOTE_HICCUP   31
 
#define EMOTE_HUG   15
 
#define EMOTE_KISS   3
 
#define EMOTE_LAST   55
 
#define EMOTE_LAUGH   7
 
#define EMOTE_LICK   32
 
#define EMOTE_NOD   1
 
#define EMOTE_POKE   17
 
#define EMOTE_POUT   33
 
#define EMOTE_PUKE   10
 
#define EMOTE_SCREAM   12
 
#define EMOTE_SHAKE   9
 
#define EMOTE_SHIVER   34
 
#define EMOTE_SHRUG   35
 
#define EMOTE_SIGH   13
 
#define EMOTE_SLAP   36
 
#define EMOTE_SMILE   5
 
#define EMOTE_SMIRK   37
 
#define EMOTE_SNAP   38
 
#define EMOTE_SNEEZE   39
 
#define EMOTE_SNICKER   40
 
#define EMOTE_SNIFF   41
 
#define EMOTE_SNORE   42
 
#define EMOTE_SPIT   43
 
#define EMOTE_STRUT   44
 
#define EMOTE_SULK   14
 
#define EMOTE_THANK   45
 
#define EMOTE_THINK   54
 
#define EMOTE_TWIDDLE   46
 
#define EMOTE_WAVE   47
 
#define EMOTE_WHISTLE   48
 
#define EMOTE_WINK   49
 
#define EMOTE_YAWN   50
 

Functions

static void basic_emote (object *op, const char *params, int emotion)
 
void command_accuse (object *op, const char *params)
 
void command_beg (object *op, const char *params)
 
void command_bleed (object *op, const char *params)
 
void command_blush (object *op, const char *params)
 
void command_bounce (object *op, const char *params)
 
void command_bow (object *op, const char *params)
 
void command_burp (object *op, const char *params)
 
void command_cackle (object *op, const char *params)
 
void command_chat (object *op, const char *params)
 
void command_chuckle (object *op, const char *params)
 
void command_clap (object *op, const char *params)
 
void command_cointoss (object *op, const char *params)
 
void command_cough (object *op, const char *params)
 
void command_cringe (object *op, const char *params)
 
void command_cry (object *op, const char *params)
 
void command_dance (object *op, const char *params)
 
void command_dmtell (object *op, const char *params)
 
void command_flip (object *op, const char *params)
 
void command_frown (object *op, const char *params)
 
void command_gasp (object *op, const char *params)
 
void command_giggle (object *op, const char *params)
 
void command_glare (object *op, const char *params)
 
void command_grin (object *op, const char *params)
 
void command_groan (object *op, const char *params)
 
void command_growl (object *op, const char *params)
 
void command_hiccup (object *op, const char *params)
 
void command_hug (object *op, const char *params)
 
void command_kiss (object *op, const char *params)
 
void command_laugh (object *op, const char *params)
 
void command_lick (object *op, const char *params)
 
void command_me (object *op, const char *params)
 
void command_nod (object *op, const char *params)
 
void command_orcknuckle (object *op, const char *params)
 
void command_poke (object *op, const char *params)
 
void command_pout (object *op, const char *params)
 
void command_puke (object *op, const char *params)
 
void command_reply (object *op, const char *params)
 
void command_say (object *op, const char *params)
 
void command_scream (object *op, const char *params)
 
void command_shake (object *op, const char *params)
 
void command_shiver (object *op, const char *params)
 
void command_shout (object *op, const char *params)
 
void command_shrug (object *op, const char *params)
 
void command_sigh (object *op, const char *params)
 
void command_slap (object *op, const char *params)
 
void command_smile (object *op, const char *params)
 
void command_smirk (object *op, const char *params)
 
void command_snap (object *op, const char *params)
 
void command_sneeze (object *op, const char *params)
 
void command_snicker (object *op, const char *params)
 
void command_sniff (object *op, const char *params)
 
void command_snore (object *op, const char *params)
 
void command_spit (object *op, const char *params)
 
void command_strut (object *op, const char *params)
 
void command_sulk (object *op, const char *params)
 
void command_tell (object *op, const char *params)
 
static void command_tell_all (object *op, const char *params, int pri, int color, int subtype, const char *desc)
 
void command_thank (object *op, const char *params)
 
void command_think (object *op, const char *params)
 
void command_twiddle (object *op, const char *params)
 
void command_wave (object *op, const char *params)
 
void command_whistle (object *op, const char *params)
 
void command_wink (object *op, const char *params)
 
void command_yawn (object *op, const char *params)
 
static void do_tell (object *op, const char *params, int adjust_listen)
 

Variables

static const char *const orcknuckle [7]
 
static const char * other_emotes [EMOTE_LAST - 1][3]
 
static const char * self_emotes [EMOTE_LAST - 1][2]
 
static const char * single_emotes [EMOTE_LAST - 1][2]
 

Detailed Description

All player communication commands, except the 'gsay' one.

Definition in file c_chat.c.

Macro Definition Documentation

◆ DICE

#define DICE   4

How many dice to roll for orcknuckle.

Definition at line 91 of file c_chat.c.

◆ EMOTE_ACCUSE

#define EMOTE_ACCUSE   18

Definition at line 399 of file c_chat.c.

◆ EMOTE_BEG

#define EMOTE_BEG   51

Definition at line 432 of file c_chat.c.

◆ EMOTE_BLEED

#define EMOTE_BLEED   52

Definition at line 433 of file c_chat.c.

◆ EMOTE_BLUSH

#define EMOTE_BLUSH   22

Definition at line 403 of file c_chat.c.

◆ EMOTE_BOUNCE

#define EMOTE_BOUNCE   4

Definition at line 385 of file c_chat.c.

◆ EMOTE_BOW

#define EMOTE_BOW   20

Definition at line 401 of file c_chat.c.

◆ EMOTE_BURP

#define EMOTE_BURP   23

Definition at line 404 of file c_chat.c.

◆ EMOTE_CACKLE

#define EMOTE_CACKLE   6

Definition at line 387 of file c_chat.c.

◆ EMOTE_CHUCKLE

#define EMOTE_CHUCKLE   24

Definition at line 405 of file c_chat.c.

◆ EMOTE_CLAP

#define EMOTE_CLAP   21

Definition at line 402 of file c_chat.c.

◆ EMOTE_COUGH

#define EMOTE_COUGH   25

Definition at line 406 of file c_chat.c.

◆ EMOTE_CRINGE

#define EMOTE_CRINGE   53

Definition at line 434 of file c_chat.c.

◆ EMOTE_CRY

#define EMOTE_CRY   16

Definition at line 397 of file c_chat.c.

◆ EMOTE_DANCE

#define EMOTE_DANCE   2

Definition at line 383 of file c_chat.c.

◆ EMOTE_FIRST

#define EMOTE_FIRST   0

Definition at line 381 of file c_chat.c.

◆ EMOTE_FLIP

#define EMOTE_FLIP   26

Definition at line 407 of file c_chat.c.

◆ EMOTE_FROWN

#define EMOTE_FROWN   27

Definition at line 408 of file c_chat.c.

◆ EMOTE_GASP

#define EMOTE_GASP   28

Definition at line 409 of file c_chat.c.

◆ EMOTE_GIGGLE

#define EMOTE_GIGGLE   8

Definition at line 389 of file c_chat.c.

◆ EMOTE_GLARE

#define EMOTE_GLARE   29

Definition at line 410 of file c_chat.c.

◆ EMOTE_GRIN

#define EMOTE_GRIN   19

Definition at line 400 of file c_chat.c.

◆ EMOTE_GROAN

#define EMOTE_GROAN   30

Definition at line 411 of file c_chat.c.

◆ EMOTE_GROWL

#define EMOTE_GROWL   11

Definition at line 392 of file c_chat.c.

◆ EMOTE_HICCUP

#define EMOTE_HICCUP   31

Definition at line 412 of file c_chat.c.

◆ EMOTE_HUG

#define EMOTE_HUG   15

Definition at line 396 of file c_chat.c.

◆ EMOTE_KISS

#define EMOTE_KISS   3

Definition at line 384 of file c_chat.c.

◆ EMOTE_LAST

#define EMOTE_LAST   55

Definition at line 436 of file c_chat.c.

◆ EMOTE_LAUGH

#define EMOTE_LAUGH   7

Definition at line 388 of file c_chat.c.

◆ EMOTE_LICK

#define EMOTE_LICK   32

Definition at line 413 of file c_chat.c.

◆ EMOTE_NOD

#define EMOTE_NOD   1

Definition at line 382 of file c_chat.c.

◆ EMOTE_POKE

#define EMOTE_POKE   17

Definition at line 398 of file c_chat.c.

◆ EMOTE_POUT

#define EMOTE_POUT   33

Definition at line 414 of file c_chat.c.

◆ EMOTE_PUKE

#define EMOTE_PUKE   10

Definition at line 391 of file c_chat.c.

◆ EMOTE_SCREAM

#define EMOTE_SCREAM   12

Definition at line 393 of file c_chat.c.

◆ EMOTE_SHAKE

#define EMOTE_SHAKE   9

Definition at line 390 of file c_chat.c.

◆ EMOTE_SHIVER

#define EMOTE_SHIVER   34

Definition at line 415 of file c_chat.c.

◆ EMOTE_SHRUG

#define EMOTE_SHRUG   35

Definition at line 416 of file c_chat.c.

◆ EMOTE_SIGH

#define EMOTE_SIGH   13

Definition at line 394 of file c_chat.c.

◆ EMOTE_SLAP

#define EMOTE_SLAP   36

Definition at line 417 of file c_chat.c.

◆ EMOTE_SMILE

#define EMOTE_SMILE   5

Definition at line 386 of file c_chat.c.

◆ EMOTE_SMIRK

#define EMOTE_SMIRK   37

Definition at line 418 of file c_chat.c.

◆ EMOTE_SNAP

#define EMOTE_SNAP   38

Definition at line 419 of file c_chat.c.

◆ EMOTE_SNEEZE

#define EMOTE_SNEEZE   39

Definition at line 420 of file c_chat.c.

◆ EMOTE_SNICKER

#define EMOTE_SNICKER   40

Definition at line 421 of file c_chat.c.

◆ EMOTE_SNIFF

#define EMOTE_SNIFF   41

Definition at line 422 of file c_chat.c.

◆ EMOTE_SNORE

#define EMOTE_SNORE   42

Definition at line 423 of file c_chat.c.

◆ EMOTE_SPIT

#define EMOTE_SPIT   43

Definition at line 424 of file c_chat.c.

◆ EMOTE_STRUT

#define EMOTE_STRUT   44

Definition at line 425 of file c_chat.c.

◆ EMOTE_SULK

#define EMOTE_SULK   14

Definition at line 395 of file c_chat.c.

◆ EMOTE_THANK

#define EMOTE_THANK   45

Definition at line 426 of file c_chat.c.

◆ EMOTE_THINK

#define EMOTE_THINK   54

Definition at line 435 of file c_chat.c.

◆ EMOTE_TWIDDLE

#define EMOTE_TWIDDLE   46

Definition at line 427 of file c_chat.c.

◆ EMOTE_WAVE

#define EMOTE_WAVE   47

Definition at line 428 of file c_chat.c.

◆ EMOTE_WHISTLE

#define EMOTE_WHISTLE   48

Definition at line 429 of file c_chat.c.

◆ EMOTE_WINK

#define EMOTE_WINK   49

Definition at line 430 of file c_chat.c.

◆ EMOTE_YAWN

#define EMOTE_YAWN   50

Definition at line 431 of file c_chat.c.

Function Documentation

◆ basic_emote()

static void basic_emote ( object op,
const char *  params,
int  emotion 
)
static

This function covers basic emotions a player can have. An emotion can be one of three things currently. Directed at oneself, directed at someone, or directed at nobody. The first set is nobody, the second at someone, and the third is directed at oneself. Every emotion does not have to be filled out in every category. The default case will take care of the ones that are not. Helper functions will call basic_emote with the proper arguments, translating them into commands. Adding a new emotion can be done by editing command.c and command.h. [garbled 09-25-2001]

Parameters
opplayer.
paramsmessage.
emotionemotion code, one of EMOTE_xxx.
Todo:
simplify function (indexed array, for instance).

Definition at line 647 of file c_chat.c.

References buf, draw_ext_info(), draw_ext_info_format(), EMOTE_FIRST, EMOTE_LAST, ext_info_map_except(), ext_info_map_except2(), FIND_PLAYER_NO_HIDDEN_DM, find_player_options(), FIND_PLAYER_PARTIAL_NAME, MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMUNICATION, MSG_TYPE_COMMUNICATION_EMOTE, obj::name, NDI_UNIQUE, NDI_WHITE, pl::ob, give::op, other_emotes, roll-o-matic::params, altar_valkyrie::pl, self_emotes, and single_emotes.

Referenced by command_accuse(), command_beg(), command_bleed(), command_blush(), command_bounce(), command_bow(), command_burp(), command_cackle(), command_chuckle(), command_clap(), command_cough(), command_cringe(), command_cry(), command_dance(), command_flip(), command_frown(), command_gasp(), command_giggle(), command_glare(), command_grin(), command_groan(), command_growl(), command_hiccup(), command_hug(), command_kiss(), command_laugh(), command_lick(), command_nod(), command_poke(), command_pout(), command_puke(), command_scream(), command_shake(), command_shiver(), command_shrug(), command_sigh(), command_slap(), command_smile(), command_smirk(), command_snap(), command_sneeze(), command_snicker(), command_sniff(), command_snore(), command_spit(), command_strut(), command_sulk(), command_thank(), command_think(), command_twiddle(), command_wave(), command_whistle(), command_wink(), and command_yawn().

+ Here is the call graph for this function:

◆ command_accuse()

void command_accuse ( object op,
const char *  params 
)

'accuse' command.

Parameters
opplayer.
paramsmessage.

Definition at line 909 of file c_chat.c.

References basic_emote(), EMOTE_ACCUSE, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_beg()

void command_beg ( object op,
const char *  params 
)

'beg' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1272 of file c_chat.c.

References basic_emote(), EMOTE_BEG, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_bleed()

void command_bleed ( object op,
const char *  params 
)

'bleed' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1283 of file c_chat.c.

References basic_emote(), EMOTE_BLEED, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_blush()

void command_blush ( object op,
const char *  params 
)

'blush' command.

Parameters
opplayer.
paramsmessage.

Definition at line 953 of file c_chat.c.

References basic_emote(), EMOTE_BLUSH, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_bounce()

void command_bounce ( object op,
const char *  params 
)

'bounce' command.

Parameters
opplayer.
paramsmessage.

Definition at line 755 of file c_chat.c.

References basic_emote(), EMOTE_BOUNCE, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_bow()

void command_bow ( object op,
const char *  params 
)

'bow' command.

Parameters
opplayer.
paramsmessage.

Definition at line 931 of file c_chat.c.

References basic_emote(), EMOTE_BOW, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_burp()

void command_burp ( object op,
const char *  params 
)

'burp' command.

Parameters
opplayer.
paramsmessage.

Definition at line 964 of file c_chat.c.

References basic_emote(), EMOTE_BURP, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_cackle()

void command_cackle ( object op,
const char *  params 
)

'cackle' command.

Parameters
opplayer.
paramsmessage.

Definition at line 777 of file c_chat.c.

References basic_emote(), EMOTE_CACKLE, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_chat()

void command_chat ( object op,
const char *  params 
)

'chat' command.

Parameters
opplayer.
paramsmessage.

Definition at line 221 of file c_chat.c.

References command_tell_all(), MSG_TYPE_COMMUNICATION_CHAT, NDI_BLUE, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_chuckle()

void command_chuckle ( object op,
const char *  params 
)

'chuckle' command.

Parameters
opplayer.
paramsmessage.

Definition at line 975 of file c_chat.c.

References basic_emote(), EMOTE_CHUCKLE, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_clap()

void command_clap ( object op,
const char *  params 
)

'clap' command.

Parameters
opplayer.
paramsmessage.

Definition at line 942 of file c_chat.c.

References basic_emote(), EMOTE_CLAP, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_cointoss()

void command_cointoss ( object op,
const char *  params 
)

'cointoss' command.

Parameters
opplayer.
paramsmessage.

Definition at line 64 of file c_chat.c.

References buf, draw_ext_info_format(), ext_info_map_except(), MAX_BUF, MSG_TYPE_COMMUNICATION, MSG_TYPE_COMMUNICATION_RANDOM, NDI_UNIQUE, NDI_WHITE, give::op, roll-o-matic::params, rotate-tower::result, rndm(), and nlohmann::detail::void().

Referenced by commands_init().

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

◆ command_cough()

void command_cough ( object op,
const char *  params 
)

'cough' command.

Parameters
opplayer.
paramsmessage.

Definition at line 986 of file c_chat.c.

References basic_emote(), EMOTE_COUGH, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_cringe()

void command_cringe ( object op,
const char *  params 
)

'cringe' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1294 of file c_chat.c.

References basic_emote(), EMOTE_CRINGE, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_cry()

void command_cry ( object op,
const char *  params 
)

'cry' command.

Parameters
opplayer.
paramsmessage.

Definition at line 887 of file c_chat.c.

References basic_emote(), EMOTE_CRY, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_dance()

void command_dance ( object op,
const char *  params 
)

'dance' command.

Parameters
opplayer.
paramsmessage.

Definition at line 733 of file c_chat.c.

References basic_emote(), EMOTE_DANCE, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_dmtell()

void command_dmtell ( object op,
const char *  params 
)

Private communication, by a DM (can't be ignored by player).

Parameters
opplayer trying to tell something to someone.
paramswho to tell, and message.

Definition at line 320 of file c_chat.c.

References do_tell(), give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_flip()

void command_flip ( object op,
const char *  params 
)

'flip' command.

Parameters
opplayer.
paramsmessage.

Definition at line 997 of file c_chat.c.

References basic_emote(), EMOTE_FLIP, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_frown()

void command_frown ( object op,
const char *  params 
)

'frown' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1008 of file c_chat.c.

References basic_emote(), EMOTE_FROWN, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_gasp()

void command_gasp ( object op,
const char *  params 
)

'gasp' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1019 of file c_chat.c.

References basic_emote(), EMOTE_GASP, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_giggle()

void command_giggle ( object op,
const char *  params 
)

'giggle' command.

Parameters
opplayer.
paramsmessage.

Definition at line 799 of file c_chat.c.

References basic_emote(), EMOTE_GIGGLE, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_glare()

void command_glare ( object op,
const char *  params 
)

'glare' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1030 of file c_chat.c.

References basic_emote(), EMOTE_GLARE, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_grin()

void command_grin ( object op,
const char *  params 
)

'grin' command.

Parameters
opplayer.
paramsmessage.

Definition at line 920 of file c_chat.c.

References basic_emote(), EMOTE_GRIN, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_groan()

void command_groan ( object op,
const char *  params 
)

'groan' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1041 of file c_chat.c.

References basic_emote(), EMOTE_GROAN, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_growl()

void command_growl ( object op,
const char *  params 
)

'growl' command.

Parameters
opplayer.
paramsmessage.

Definition at line 832 of file c_chat.c.

References basic_emote(), EMOTE_GROWL, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_hiccup()

void command_hiccup ( object op,
const char *  params 
)

'hiccup' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1052 of file c_chat.c.

References basic_emote(), EMOTE_HICCUP, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_hug()

void command_hug ( object op,
const char *  params 
)

'hug' command.

Parameters
opplayer.
paramsmessage.

Definition at line 876 of file c_chat.c.

References basic_emote(), EMOTE_HUG, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_kiss()

void command_kiss ( object op,
const char *  params 
)

'kiss' command.

Parameters
opplayer.
paramsmessage.

Definition at line 744 of file c_chat.c.

References basic_emote(), EMOTE_KISS, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_laugh()

void command_laugh ( object op,
const char *  params 
)

'laugh' command.

Parameters
opplayer.
paramsmessage.

Definition at line 788 of file c_chat.c.

References basic_emote(), EMOTE_LAUGH, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_lick()

void command_lick ( object op,
const char *  params 
)

'lick' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1063 of file c_chat.c.

References basic_emote(), EMOTE_LICK, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_me()

void command_me ( object op,
const char *  params 
)

'me' command.

Parameters
opplayer.
paramsmessage.

Definition at line 47 of file c_chat.c.

References buf, ext_info_map(), MAX_BUF, MSG_TYPE_COMMUNICATION, MSG_TYPE_COMMUNICATION_ME, NDI_BLUE, NDI_UNIQUE, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_nod()

void command_nod ( object op,
const char *  params 
)

'nod' command.

Parameters
opplayer.
paramsmessage.

Definition at line 722 of file c_chat.c.

References basic_emote(), EMOTE_NOD, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_orcknuckle()

void command_orcknuckle ( object op,
const char *  params 
)

Plays the "orcknucke" game.

If there is an "dice" archetype in server arches, this command will require the player to have at least 4 dice to play. There is a 5% chance to lose one dice at each play. Dice can be made through alchemy (finding the recipe is left as an exercice to the player). Note that the check is on the name 'dice', so you can have multiple archetypes for that name, they'll be all taken into account.

Parameters
opplayer who plays.
paramsstring sent by the player. Ignored.

Definition at line 108 of file c_chat.c.

Referenced by commands_init().

+ Here is the caller graph for this function:

◆ command_poke()

void command_poke ( object op,
const char *  params 
)

'poke' command.

Parameters
opplayer.
paramsmessage.

Definition at line 898 of file c_chat.c.

References basic_emote(), EMOTE_POKE, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_pout()

void command_pout ( object op,
const char *  params 
)

'pout' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1074 of file c_chat.c.

References basic_emote(), EMOTE_POUT, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_puke()

void command_puke ( object op,
const char *  params 
)

'puke' command.

Parameters
opplayer.
paramsmessage.

Definition at line 821 of file c_chat.c.

References basic_emote(), EMOTE_PUKE, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_reply()

void command_reply ( object op,
const char *  params 
)

Reply to last person who told you something [mids 01/14/2002]

Must have been told something by someone first.

Parameters
opwho is telling.
paramsmessage to say.
Returns
1.

Definition at line 336 of file c_chat.c.

References draw_ext_info(), draw_ext_info_format(), find_player(), FLAG_WIZ, pl::hidden, pl::last_tell, MAX_NAME, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMUNICATION, MSG_TYPE_COMMUNICATION_TELL, obj::name, NDI_ORANGE, NDI_UNIQUE, pl::ob, give::op, roll-o-matic::params, altar_valkyrie::pl, QUERY_FLAG, and safe_strncpy.

Referenced by commands_init().

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

◆ command_say()

void command_say ( object op,
const char *  params 
)

'say' command.

Parameters
opplayer.
paramsmessage.

Definition at line 34 of file c_chat.c.

References monster_communicate(), give::op, and roll-o-matic::params.

Referenced by cfapi_object_say(), and commands_init().

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

◆ command_scream()

void command_scream ( object op,
const char *  params 
)

'scream' command.

Parameters
opplayer.
paramsmessage.

Definition at line 843 of file c_chat.c.

References basic_emote(), EMOTE_SCREAM, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_shake()

void command_shake ( object op,
const char *  params 
)

'shake' command.

Parameters
opplayer.
paramsmessage.

Definition at line 810 of file c_chat.c.

References basic_emote(), EMOTE_SHAKE, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_shiver()

void command_shiver ( object op,
const char *  params 
)

'shiver' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1085 of file c_chat.c.

References basic_emote(), EMOTE_SHIVER, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_shout()

void command_shout ( object op,
const char *  params 
)

'shout' command.

Parameters
opplayer.
paramsmessage.

Definition at line 210 of file c_chat.c.

References command_tell_all(), MSG_TYPE_COMMUNICATION_SHOUT, NDI_RED, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_shrug()

void command_shrug ( object op,
const char *  params 
)

'shrug' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1096 of file c_chat.c.

References basic_emote(), EMOTE_SHRUG, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_sigh()

void command_sigh ( object op,
const char *  params 
)

'sigh' command.

Parameters
opplayer.
paramsmessage.

Definition at line 854 of file c_chat.c.

References basic_emote(), EMOTE_SIGH, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_slap()

void command_slap ( object op,
const char *  params 
)

'slap' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1107 of file c_chat.c.

References basic_emote(), EMOTE_SLAP, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_smile()

void command_smile ( object op,
const char *  params 
)

'smile' command.

Parameters
opplayer.
paramsmessage.

Definition at line 766 of file c_chat.c.

References basic_emote(), EMOTE_SMILE, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_smirk()

void command_smirk ( object op,
const char *  params 
)

'smirk' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1118 of file c_chat.c.

References basic_emote(), EMOTE_SMIRK, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_snap()

void command_snap ( object op,
const char *  params 
)

'snap' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1129 of file c_chat.c.

References basic_emote(), EMOTE_SNAP, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_sneeze()

void command_sneeze ( object op,
const char *  params 
)

'sneeze' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1140 of file c_chat.c.

References basic_emote(), EMOTE_SNEEZE, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_snicker()

void command_snicker ( object op,
const char *  params 
)

'snicker' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1151 of file c_chat.c.

References basic_emote(), EMOTE_SNICKER, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_sniff()

void command_sniff ( object op,
const char *  params 
)

'sniff' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1162 of file c_chat.c.

References basic_emote(), EMOTE_SNIFF, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_snore()

void command_snore ( object op,
const char *  params 
)

'snore' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1173 of file c_chat.c.

References basic_emote(), EMOTE_SNORE, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_spit()

void command_spit ( object op,
const char *  params 
)

'spit' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1184 of file c_chat.c.

References basic_emote(), EMOTE_SPIT, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_strut()

void command_strut ( object op,
const char *  params 
)

'strut' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1195 of file c_chat.c.

References basic_emote(), EMOTE_STRUT, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_sulk()

void command_sulk ( object op,
const char *  params 
)

'sulk' command.

Parameters
opplayer.
paramsmessage.

Definition at line 865 of file c_chat.c.

References basic_emote(), EMOTE_SULK, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_tell()

void command_tell ( object op,
const char *  params 
)

Private communication.

Parameters
opplayer trying to tell something to someone.
paramswho to tell, and message.

Definition at line 308 of file c_chat.c.

References do_tell(), give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_tell_all()

static void command_tell_all ( object op,
const char *  params,
int  pri,
int  color,
int  subtype,
const char *  desc 
)
static

Utility function for chat or shout.

Parameters
opplayer.
paramsmessage.
primessage priority.
colormessage color.
subtypemessage subtype.
desc'chat' or 'shouts', will be appened after the player's name and before a :.

Definition at line 183 of file c_chat.c.

References smoking_pipe::color, draw_ext_info(), draw_ext_info_format(), EVENT_SHOUT, events_execute_global_event(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMUNICATION, NDI_ALL, NDI_UNIQUE, give::op, and roll-o-matic::params.

Referenced by command_chat(), and command_shout().

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

◆ command_thank()

void command_thank ( object op,
const char *  params 
)

'thank' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1206 of file c_chat.c.

References basic_emote(), EMOTE_THANK, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_think()

void command_think ( object op,
const char *  params 
)

'think' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1305 of file c_chat.c.

References basic_emote(), EMOTE_THINK, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_twiddle()

void command_twiddle ( object op,
const char *  params 
)

'twiddle' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1217 of file c_chat.c.

References basic_emote(), EMOTE_TWIDDLE, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_wave()

void command_wave ( object op,
const char *  params 
)

'wave' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1228 of file c_chat.c.

References basic_emote(), EMOTE_WAVE, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_whistle()

void command_whistle ( object op,
const char *  params 
)

'whistle' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1239 of file c_chat.c.

References basic_emote(), EMOTE_WHISTLE, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_wink()

void command_wink ( object op,
const char *  params 
)

'wink' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1250 of file c_chat.c.

References basic_emote(), EMOTE_WINK, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_yawn()

void command_yawn ( object op,
const char *  params 
)

'yawn' command.

Parameters
opplayer.
paramsmessage.

Definition at line 1261 of file c_chat.c.

References basic_emote(), EMOTE_YAWN, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ do_tell()

static void do_tell ( object op,
const char *  params,
int  adjust_listen 
)
static

Actual function sending a private message.

Parameters
opplayer trying to tell something to someone.
paramswho to tell, and message
adjust_listenif non-zero, recipient can't ignore the message through 'listen' levels.

Definition at line 235 of file c_chat.c.

References buf, draw_ext_info(), draw_ext_info_format(), EVENT_TELL, events_execute_global_event(), find_player_partial_name(), FLAG_WIZ, pl::hidden, pl::last_tell, pl::listening, MAX_BUF, navar-midane_pickup::msg, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMUNICATION, MSG_TYPE_COMMUNICATION_TELL, give::name, obj::name, NDI_ORANGE, NDI_UNIQUE, pl::ob, give::op, roll-o-matic::params, altar_valkyrie::pl, QUERY_FLAG, and strlcpy().

Referenced by command_dmtell(), and command_tell().

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

Variable Documentation

◆ orcknuckle

const char* const orcknuckle[7]
static
Initial value:
= {
"none",
"beholder",
"ghost",
"knight",
"princess",
"dragon",
"orc"
}

Results for the "orcknucle" game.

Definition at line 81 of file c_chat.c.

◆ other_emotes

const char* other_emotes[EMOTE_LAST - 1][3]
static

Emote texts when the player applies the emote to someone else. Three strings, first is sent to the player, second to the recipient, third to others. The first two must contain s (player's name), second must contain 2 s (player and victim's name). The emotes will be seeked at the index of their value minus 1. If an entry is NULL, then a default text will be used.

Definition at line 571 of file c_chat.c.

Referenced by basic_emote().

◆ self_emotes

const char* self_emotes[EMOTE_LAST - 1][2]
static

Emote texts when the player applies the emote to herself. Two strings, first is sent to the player, second to other players (must contain s). The emotes will be seeked at the index of their value minus 1. If an entry is NULL, then a default text will be used.

Definition at line 507 of file c_chat.c.

Referenced by basic_emote().

◆ single_emotes

const char* single_emotes[EMOTE_LAST - 1][2]
static

Emote texts when the player does not specify who to apply the emote. Two strings, first is sent to the player herself, second to other players (must contain s). The emotes will be seeked at the index of their value minus 1. If an entry is NULL, then a default text will be used.

Definition at line 445 of file c_chat.c.

Referenced by basic_emote().