diff options
author | shennetsind <ind@henn.et> | 2014-03-18 15:00:16 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2014-03-18 15:00:16 -0300 |
commit | 7b71f22331c805a406c57f5a8eff93b464b57018 (patch) | |
tree | ed65b87c241aa123d46ed32f13257d487e3dfe71 /src/common/HPM.c | |
parent | 4cc9d5f91cf6276e28cc02bb75fc4158d28d553b (diff) | |
parent | 21aeb5aa1d5fee9702aba476a94b800c94b29859 (diff) | |
download | hercules-7b71f22331c805a406c57f5a8eff93b464b57018.tar.gz hercules-7b71f22331c805a406c57f5a8eff93b464b57018.tar.bz2 hercules-7b71f22331c805a406c57f5a8eff93b464b57018.tar.xz hercules-7b71f22331c805a406c57f5a8eff93b464b57018.zip |
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'src/common/HPM.c')
-rw-r--r-- | src/common/HPM.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/common/HPM.c b/src/common/HPM.c index a25a17782..971eb83bd 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -269,11 +269,12 @@ void hplugin_unload(struct hplugin* plugin) { } } -void hplugins_config_read(void) { +void hplugins_config_read(const char * const *extra_plugins, int extra_plugins_count) { config_t plugins_conf; config_setting_t *plist = NULL; const char *config_filename = "conf/plugins.conf"; // FIXME hardcoded name FILE *fp; + int i; // uncomment once login/char support is wrapped up // if( !HPM->DataCheck ) { @@ -294,9 +295,13 @@ void hplugins_config_read(void) { HPM->symbol_defaults_sub(); plist = libconfig->lookup(&plugins_conf, "plugins_list"); + for (i = 0; i < extra_plugins_count; i++) { + config_setting_t *entry = libconfig->setting_add(plist, NULL, CONFIG_TYPE_STRING); + config_setting_set_string(entry, extra_plugins[i]); + } if (plist != NULL) { - int length = libconfig->setting_length(plist), i; + int length = libconfig->setting_length(plist); char filename[60]; for(i = 0; i < length; i++) { if( !strcmpi(libconfig->setting_get_string_elem(plist,i),"HPMHooking") ) {//must load it first |