Atrinik Client  4.0
Data Structures | Typedefs | Functions | Variables
cmd_aliases.c File Reference
#include <global.h>
#include <toolkit/string.h>
#include <toolkit/path.h>

Go to the source code of this file.

Data Structures

struct  cmd_alias_struct
 

Typedefs

typedef struct cmd_alias_struct cmd_alias_struct
 

Functions

static void cmd_aliases_load (const char *path)
 
void cmd_aliases_init (void)
 
void cmd_aliases_deinit (void)
 
static void cmd_aliases_execute (const char *cmd, const char *params)
 
int cmd_aliases_handle (const char *cmd)
 

Variables

static cmd_alias_structcmd_aliases = NULL
 

Detailed Description

Handles command aliases system.

Author
Alex Tokar

Definition in file cmd_aliases.c.

Typedef Documentation

One command alias.

Function Documentation

void cmd_aliases_deinit ( void  )

Deinitialize the command aliases system.

Definition at line 174 of file cmd_aliases.c.

static void cmd_aliases_execute ( const char *  cmd,
const char *  params 
)
static

Execute the specified command alias.

Parameters
cmdWhat to execute.
paramsParameters passed by the player. NULL if none.

Definition at line 203 of file cmd_aliases.c.

int cmd_aliases_handle ( const char *  cmd)

Try to handle player's command.

Parameters
cmdCommand to handle.
Returns
1 if it was handled, 0 otherwise.

Definition at line 317 of file cmd_aliases.c.

void cmd_aliases_init ( void  )

Initialize the command aliases system.

Definition at line 165 of file cmd_aliases.c.

static void cmd_aliases_load ( const char *  path)
static

Load command aliases file.

Parameters
pathWhere to load the file from.

Definition at line 72 of file cmd_aliases.c.

Variable Documentation

cmd_alias_struct* cmd_aliases = NULL
static

All the possible command aliases.

Definition at line 65 of file cmd_aliases.c.