diff options
author | shennetsind <ind@henn.et> | 2013-05-15 20:00:58 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-05-15 20:00:58 -0300 |
commit | 9837043bef79e7767018a3735233c3fd573977eb (patch) | |
tree | 67255659bb92c9469c2131a7283743330d03644a /src | |
parent | 6432822ff5b185b3115480ff536a55a3ce44ea78 (diff) | |
download | hercules-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')
-rw-r--r-- | src/map/atcommand.c | 6 |
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; |