diff options
author | jaBote <j@bot.e> | 2013-05-03 01:45:50 +0200 |
---|---|---|
committer | jaBote <j@bot.e> | 2013-05-03 01:45:50 +0200 |
commit | 1e5e8f5f42abb2cd42ad7ecf8e07439b8a1c570b (patch) | |
tree | c8825cc2dc141d91fe1fcc52739a0e79a89c80e9 /src/map/atcommand.h | |
parent | f41dea469a52213acfde4f4ea5e8d7bbbd869bed (diff) | |
parent | 274bfc3b06616ea03c467d8eed23fae61c72fe18 (diff) | |
download | hercules-1e5e8f5f42abb2cd42ad7ecf8e07439b8a1c570b.tar.gz hercules-1e5e8f5f42abb2cd42ad7ecf8e07439b8a1c570b.tar.bz2 hercules-1e5e8f5f42abb2cd42ad7ecf8e07439b8a1c570b.tar.xz hercules-1e5e8f5f42abb2cd42ad7ecf8e07439b8a1c570b.zip |
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'src/map/atcommand.h')
-rw-r--r-- | src/map/atcommand.h | 12 |
1 files changed, 11 insertions, 1 deletions
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_ */ |