diff options
author | Haruna <haru@dotalux.com> | 2014-11-15 17:33:46 +0100 |
---|---|---|
committer | Haruna <haru@dotalux.com> | 2014-11-15 17:33:46 +0100 |
commit | 27cd926dd2f41e008da738e8d9259cd0c33a2f77 (patch) | |
tree | fc62c34bea003f6d5839996474485d51ddf98ad6 /src/map | |
parent | 47565d423f40f4fbbbb032dcc6fa2f6670bfafab (diff) | |
parent | 35d190c1927d4405507490ac1a34c3e324d47762 (diff) | |
download | hercules-27cd926dd2f41e008da738e8d9259cd0c33a2f77.tar.gz hercules-27cd926dd2f41e008da738e8d9259cd0c33a2f77.tar.bz2 hercules-27cd926dd2f41e008da738e8d9259cd0c33a2f77.tar.xz hercules-27cd926dd2f41e008da738e8d9259cd0c33a2f77.zip |
Merge pull request #389 from 4144/confplugins
Add support for plugin parameters in different config files (before was only battle config)
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/log.c | 3 | ||||
-rw-r--r-- | src/map/map.c | 2 | ||||
-rw-r--r-- | src/map/script.c | 5 |
3 files changed, 9 insertions, 1 deletions
diff --git a/src/map/log.c b/src/map/log.c index 3efcd09df..f0fd6795c 100644 --- a/src/map/log.c +++ b/src/map/log.c @@ -20,6 +20,7 @@ #include "../common/showmsg.h" #include "../common/sql.h" // SQL_INNODB #include "../common/strlib.h" +#include "../common/HPM.h" struct log_interface log_s; @@ -453,6 +454,8 @@ int log_config_read(const char* cfgName) { //support the import command, just like any other config else if( strcmpi(w1,"import") == 0 ) logs->config_read(w2); + else if (HPM->parseConf(w1, w2, HPCT_LOG)) + ; // handled by plugins else ShowWarning("Unknown setting '%s' in file %s\n", w1, cfgName); } diff --git a/src/map/map.c b/src/map/map.c index 5c0f5d65e..9e2727b07 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -3780,6 +3780,8 @@ int inter_config_read(char *cfgName) { /* import */ else if(strcmpi(w1,"import")==0) map->inter_config_read(w2); + else + HPM->parseConf(w1, w2, HPCT_MAP_INTER); } fclose(fp); diff --git a/src/map/script.c b/src/map/script.c index 56bccbdec..aa90a5b1c 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -55,6 +55,7 @@ #include "../common/sysinfo.h" #include "../common/timer.h" #include "../common/utils.h" +#include "../common/HPM.h" #ifndef WIN32 #include <sys/time.h> @@ -4141,7 +4142,9 @@ int script_config_read(char *cfgName) { else if(strcmpi(w1,"import")==0) { script->config_read(w2); } - else { + else if(HPM->parseConf(w1, w2, HPCT_SCRIPT)) { + ; // handled by plugin + } else { ShowWarning("Unknown setting '%s' in file %s\n", w1, cfgName); } } |