summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-10 16:00:28 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-15 19:08:35 +0300
commitc70f82729539b2aa630d1ab5358e89128a0b3f9e (patch)
treed55957a53770913c47346076954dbbc2a2af1853
parent1e125f7680aa0b7bdcd050e3aec3378e579d0064 (diff)
downloadhercules-c70f82729539b2aa630d1ab5358e89128a0b3f9e.tar.gz
hercules-c70f82729539b2aa630d1ab5358e89128a0b3f9e.tar.bz2
hercules-c70f82729539b2aa630d1ab5358e89128a0b3f9e.tar.xz
hercules-c70f82729539b2aa630d1ab5358e89128a0b3f9e.zip
Add support for plugin options in map server config (logs.conf).
-rw-r--r--src/common/HPMi.h3
-rw-r--r--src/map/log.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/common/HPMi.h b/src/common/HPMi.h
index 850f734ba..10a5ec082 100644
--- a/src/common/HPMi.h
+++ b/src/common/HPMi.h
@@ -89,6 +89,7 @@ enum HPluginConfType {
HPCT_CHAR, /* char-server.conf (char-server) */
HPCT_CHAR_INTER, /* inter-server.conf (char-server) */
HPCT_MAP_INTER, /* inter-server.conf (map-server) */
+ HPCT_LOG, /* logs.conf (map-server) */
HPCT_MAX,
};
@@ -169,6 +170,8 @@ enum HPluginConfType {
#define addCharInterConf(bcname,funcname) HPMi->addConf(HPMi->pid,HPCT_CHAR_INTER,bcname,funcname)
/* HPMi->addMapInter */
#define addMapInterConf(bcname,funcname) HPMi->addConf(HPMi->pid,HPCT_MAP_INTER,bcname,funcname)
+/* HPMi->addLog */
+#define addLogConf(bcname,funcname) HPMi->addConf(HPMi->pid,HPCT_LOG,bcname,funcname)
/* HPMi->addPCGPermission */
#define addGroupPermission(pcgname,maskptr) HPMi->addPCGPermission(HPMi->pid,pcgname,&maskptr)
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);
}