summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-05-15 20:00:58 -0300
committershennetsind <ind@henn.et>2013-05-15 20:00:58 -0300
commit9837043bef79e7767018a3735233c3fd573977eb (patch)
tree67255659bb92c9469c2131a7283743330d03644a /src/map/atcommand.c
parent6432822ff5b185b3115480ff536a55a3ce44ea78 (diff)
downloadhercules-9837043bef79e7767018a3735233c3fd573977eb.tar.gz
hercules-9837043bef79e7767018a3735233c3fd573977eb.tar.bz2
hercules-9837043bef79e7767018a3735233c3fd573977eb.tar.xz
hercules-9837043bef79e7767018a3735233c3fd573977eb.zip
Fixed HPM @command implementation
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 428113c68..931fc280b 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -10202,12 +10202,11 @@ bool atcommand_hp_add(char *name, AtCommandFunc func) {
safestrncpy(cmd->command, name, sizeof(cmd->command));
cmd->func = func;
cmd->help = NULL;/* start as null dear */
-
+
strdb_put(atcommand->db, cmd->command, cmd);
return true;
}
void atcommand_db_clear(void) {
-
if (atcommand->db != NULL) {
DBIterator *iter = db_iterator(atcommand->db);
AtCommandInfo* cmd;
@@ -10239,8 +10238,6 @@ void atcommand_doload(void) {
}
void do_init_atcommand(void) {
- atcommand->db = NULL;
- atcommand->alias_db = NULL;
atcommand->at_symbol = '@';
atcommand->char_symbol = '#';
atcommand->binding_count = 0;
@@ -10258,6 +10255,7 @@ void atcommand_defaults(void) {
atcommand = &atcommand_s;
atcommand->db = NULL;
+ atcommand->alias_db = NULL;
atcommand->init = do_init_atcommand;
atcommand->final = do_final_atcommand;