Crossfire Server, Trunk
commands.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  shutdown_s
 

Macros

#define COMMAND_TYPE_COMMUNICATION   1
 
#define COMMAND_TYPE_NORMAL   0
 
#define COMMAND_TYPE_WIZARD   2
 

Typedefs

typedef void(* command_function) (object *op, const char *params)
 
typedef void(* command_function_extra) (object *op, const char *params, const char *extra)
 
typedef uint64_t command_registration
 

Enumerations

enum  shutdown_type { SHUTDOWN_NONE, SHUTDOWN_TIME, SHUTDOWN_IDLE }
 

Variables

struct shutdown_s shutdown_state
 

Detailed Description

Defines and structures related to commands the player can send.

Definition in file commands.h.

Macro Definition Documentation

◆ COMMAND_TYPE_COMMUNICATION

#define COMMAND_TYPE_COMMUNICATION   1

Communication commands.

Definition at line 37 of file commands.h.

◆ COMMAND_TYPE_NORMAL

#define COMMAND_TYPE_NORMAL   0

Standard commands.

Definition at line 35 of file commands.h.

◆ COMMAND_TYPE_WIZARD

#define COMMAND_TYPE_WIZARD   2

Wizard-only commands.

Definition at line 39 of file commands.h.

Typedef Documentation

◆ command_function

typedef void(* command_function) (object *op, const char *params)

One command function.

Parameters
opthe player executing the command
paramsthe command parameters; empty string if no commands are given; leading and trailing spaces have been removed

Definition at line 17 of file commands.h.

◆ command_function_extra

typedef void(* command_function_extra) (object *op, const char *params, const char *extra)

One command function, with a custom parameter specified at registration time.

Parameters
opthe player executing the command
paramsthe command parameters; empty string if no commands are given; leading and trailing spaces have been removed
extraextra parameter as specified at registration, with NULL changed to empty string

Definition at line 29 of file commands.h.

◆ command_registration

typedef uint64_t command_registration

Identifier when registering a command.

Definition at line 32 of file commands.h.

Enumeration Type Documentation

◆ shutdown_type

Enumerator
SHUTDOWN_NONE 
SHUTDOWN_TIME 
SHUTDOWN_IDLE 

Definition at line 41 of file commands.h.

Variable Documentation

◆ shutdown_state

struct shutdown_s shutdown_state

Definition at line 44 of file c_wiz.cpp.

Referenced by check_shutdown(), command_shutdown(), and login_check_shutdown().