summaryrefslogtreecommitdiff
path: root/src/common/HPM.h
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-08-20 18:44:02 +0200
committerHaru <haru@dotalux.com>2016-08-20 18:44:02 +0200
commit7a276976948fa39e2d329de3b622c34dd0c572ad (patch)
tree887387c0aaedb88c609a945514669cbba457e307 /src/common/HPM.h
parentf77278551b125da51b6917c53e608abdecdd146c (diff)
downloadhercules-7a276976948fa39e2d329de3b622c34dd0c572ad.tar.gz
hercules-7a276976948fa39e2d329de3b622c34dd0c572ad.tar.bz2
hercules-7a276976948fa39e2d329de3b622c34dd0c572ad.tar.xz
hercules-7a276976948fa39e2d329de3b622c34dd0c572ad.zip
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 <haru@dotalux.com>
Diffstat (limited to 'src/common/HPM.h')
-rw-r--r--src/common/HPM.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/HPM.h b/src/common/HPM.h
index 43f610a6a..e55397022 100644
--- a/src/common/HPM.h
+++ b/src/common/HPM.h
@@ -163,7 +163,8 @@ struct HPM_interface {
unsigned char (*parse_packets) (int fd, int packet_id, enum HPluginPacketHookingPoints point);
void (*load_sub) (struct hplugin *plugin);
/* for custom config parsing */
- bool (*parseConf) (const char *w1, const char *w2, enum HPluginConfType point);
+ bool (*parse_conf) (const struct config_t *config, const char *filename, enum HPluginConfType point, bool imported);
+ bool (*parse_conf_entry) (const char *w1, const char *w2, enum HPluginConfType point);
bool (*getBattleConf) (const char* w1, int *value);
/* validates plugin data */
bool (*DataCheck) (struct s_HPMDataCheck *src, unsigned int size, int version, char *name);