summaryrefslogtreecommitdiff
path: root/src/map/atcommand.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/atcommand.h')
-rw-r--r--src/map/atcommand.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/map/atcommand.h b/src/map/atcommand.h
index 603abc0cc..39f7cc2b2 100644
--- a/src/map/atcommand.h
+++ b/src/map/atcommand.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _ATCOMMAND_H_
-#define _ATCOMMAND_H_
+#ifndef _MAP_ATCOMMAND_H_
+#define _MAP_ATCOMMAND_H_
#include "../common/conf.h"
#include "../common/db.h"
@@ -21,7 +21,7 @@ struct block_list;
**/
#define ATCOMMAND_LENGTH 50
#define MAX_MSG 1500
-
+#define msg_txt(idx) atcommand->msg(idx)
/**
* Enumerations
**/
@@ -77,16 +77,16 @@ struct atcommand_interface {
/* */
char* msg_table[MAX_MSG]; // Server messages (0-499 reserved for GM commands, 500-999 reserved for others)
/* */
- void (*init) (void);
+ void (*init) (bool minimal);
void (*final) (void);
/* */
- bool (*parse) (const int fd, struct map_session_data* sd, const char* message, int type);
+ bool (*exec) (const int fd, struct map_session_data *sd, const char *message, bool player_invoked);
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) (GroupSettings **groups, config_setting_t **commands_, size_t sz);
AtCommandInfo* (*exists) (const char* name);
- int (*msg_read) (const char* cfgName);
+ bool (*msg_read) (const char* cfgName);
void (*final_msg) (void);
/* atcommand binding */
struct atcmd_binding_data* (*get_bind_byname) (const char* name);
@@ -110,17 +110,15 @@ struct atcommand_interface {
int (*cmd_db_clear_sub) (DBKey key, DBData *data, va_list args);
void (*doload) (void);
void (*base_commands) (void);
+ bool (*add) (char *name, AtCommandFunc func, bool replace);
+ const char* (*msg) (int msg_number);
};
struct atcommand_interface *atcommand;
-/* will remain outside for a while, we have plans for this little fellow */
-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_ */
+#endif /* _MAP_ATCOMMAND_H_ */