From 7a276976948fa39e2d329de3b622c34dd0c572ad Mon Sep 17 00:00:00 2001 From: Haru Date: Sat, 20 Aug 2016 18:44:02 +0200 Subject: Re-added HPM support for configuration settings Plugin settings should be relative to the the libconfig file root. For example, a configuration setting of type HPCT_CHAR will be relative to the root of conf/char/char-server.conf. In order to add a configuration entry inside the char_configuration block, the full configuration path (slash-delimited) should be passed to addCharConf(), as in the following example: `addCharConf("char_configuration/my_setting", my_parser_function);` Signed-off-by: Haru --- src/char/char.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/char') diff --git a/src/char/char.c b/src/char/char.c index 6f79a55e3..712d7efb2 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -5399,7 +5399,8 @@ bool char_sql_config_read(const char *filename, bool imported) } } - // TODO HPM->parseConf(w1, w2, HPCT_CHAR_INTER); + if (!HPM->parse_conf(&config, filename, HPCT_CHAR_INTER, imported)) + retval = false; libconfig->destroy(&config); return retval; @@ -5553,7 +5554,8 @@ bool char_config_read(const char *filename, bool imported) if (!pincode->config_read(filename, &config, imported)) retval = false; - // TODO HPM->parseConf(w1, w2, HPCT_CHAR); + if (!HPM->parse_conf(&config, filename, HPCT_CHAR, imported)) + retval = false; ShowInfo("Done reading %s.\n", filename); -- cgit v1.2.3-70-g09d2