From a2c45a8db6d724b98ab41fe9e75e1f7ea7523d5d Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 2 May 2013 17:14:01 -0300 Subject: Introducing Hercules Plugin Mananger http://hercules.ws/board/topic/549-introducing-hercules-plugin-manager/ Signed-off-by: shennetsind --- src/map/atcommand.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/map/atcommand.h') diff --git a/src/map/atcommand.h b/src/map/atcommand.h index cea59a416..f09b1f2b8 100644 --- a/src/map/atcommand.h +++ b/src/map/atcommand.h @@ -5,6 +5,8 @@ #ifndef _ATCOMMAND_H_ #define _ATCOMMAND_H_ +#include "../common/db.h" + /** * Declarations **/ @@ -66,14 +68,19 @@ struct atcommand_interface { /* atcommand binding */ struct atcmd_binding_data** binding; int binding_count; + unsigned int *group_ids; + /* other vars */ + DBMap* db; //name -> AtCommandInfo + DBMap* alias_db; //alias -> AtCommandInfo /* */ void (*init) (void); void (*final) (void); /* */ bool (*parse) (const int fd, struct map_session_data* sd, const char* message, int type); + bool (*create) (char *name, AtCommandFunc func); bool (*can_use) (struct map_session_data *sd, const char *command); bool (*can_use2) (struct map_session_data *sd, const char *command, AtCommandType type); - void (*load_groups) (int* group_ids); + void (*load_groups) (void); AtCommandInfo* (*exists) (const char* name); int (*msg_read) (const char* cfgName); void (*final_msg) (void); @@ -85,5 +92,8 @@ struct atcommand_interface *atcommand; const char* msg_txt(int msg_number); void atcommand_defaults(void); +/* stay here */ +#define ACMD(x) static bool atcommand_ ## x (const int fd, struct map_session_data* sd, const char* command, const char* message, struct AtCommandInfo *info) +#define ACMD_A(x) atcommand_ ## x #endif /* _ATCOMMAND_H_ */ -- cgit v1.2.3-60-g2f50