Atrinik Server  4.0
Functions | Variables
commands.c File Reference
#include <global.h>
#include <toolkit/string.h>
#include <player.h>
#include <object.h>
#include <toolkit/path.h>

Go to the source code of this file.

Functions

static void commands_permission_group_free (permission_group_struct *tmp)
 
static void commands_permissions_read (const char *path)
 
 TOOLKIT_API (DEPENDS(path), DEPENDS(string))
 
 TOOLKIT_INIT_FUNC (commands)
 
TOOLKIT_INIT_FUNC_FINISH TOOLKIT_DEINIT_FUNC (commands)
 
static void commands_permission_group_add (permission_group_struct *tmp)
 
void commands_add (const char *name, command_func handle_func, double delay, uint64_t flags)
 
static int commands_check_permission_group (const char *name, size_t len, const char *command)
 
int commands_check_permission (player *pl, const char *command)
 
void commands_handle (object *op, char *cmd)
 

Variables

static command_structcommands
 
static permission_group_structpermission_groups
 

Detailed Description

Commands API.

Author
Alex Tokar

Definition in file commands.c.

Function Documentation

static void commands_permission_group_add ( permission_group_struct tmp)
static

Add a single permission group structure to the hash table of permission groups.

Parameters
tmpWhat to add.

Definition at line 163 of file commands.c.

static TOOLKIT_DEINIT_FUNC_FINISH void commands_permission_group_free ( permission_group_struct tmp)
static

Free a single permission group structure.

Parameters
tmpWhat to free.

Definition at line 140 of file commands.c.

static void commands_permissions_read ( const char *  path)
static

Read command permissions config file.

Parameters
pathFile to read.

Definition at line 183 of file commands.c.

Variable Documentation

permission_group_struct* permission_groups
static

Hash table containing all permission groups.

Definition at line 43 of file commands.c.