summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-10 14:29:38 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-15 19:26:02 +0300
commit1f2778dbae424c1d41bdc969ab37eb20b4a64dbf (patch)
treed9714ad27fb0222f86b7dbdc826c833ebfa66b1b
parent9f785590a3a3b6e34fe698605eb858ca3ea01485 (diff)
downloadhercules-1f2778dbae424c1d41bdc969ab37eb20b4a64dbf.tar.gz
hercules-1f2778dbae424c1d41bdc969ab37eb20b4a64dbf.tar.bz2
hercules-1f2778dbae424c1d41bdc969ab37eb20b4a64dbf.tar.xz
hercules-1f2778dbae424c1d41bdc969ab37eb20b4a64dbf.zip
Add support for plugin options in char server config.
-rw-r--r--src/char/char.c2
-rw-r--r--src/common/HPMi.h5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 0dd7aaa79..3bfef8762 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -5788,6 +5788,8 @@ int char_config_read(const char* cfgName)
char_maintenance_min_group_id = atoi(w2);
} else if (strcmpi(w1, "import") == 0) {
chr->config_read(w2);
+ } else if(HPM->parseConf(w1, w2, HPCT_CHAR)) {
+ ; // handled by plugin
} else
chr->config_dispatch(w1,w2);
}
diff --git a/src/common/HPMi.h b/src/common/HPMi.h
index 49a6b7c37..12eee94f4 100644
--- a/src/common/HPMi.h
+++ b/src/common/HPMi.h
@@ -85,7 +85,8 @@ enum HPluginDataTypes {
/* used in macros and conf storage */
enum HPluginConfType {
HPCT_BATTLE, /* battle-conf (map-server */
- HPCT_LOGIN, /* login-server.conf (login-server) */
+ HPCT_LOGIN, /* login-server.conf (login-server) */
+ HPCT_CHAR, /* char-server.conf (char-server) */
HPCT_MAX,
};
@@ -160,6 +161,8 @@ enum HPluginConfType {
#define addBattleConf(bcname,funcname) HPMi->addConf(HPMi->pid,HPCT_BATTLE,bcname,funcname)
/* HPMi->addLogin */
#define addLoginConf(bcname,funcname) HPMi->addConf(HPMi->pid,HPCT_LOGIN,bcname,funcname)
+/* HPMi->addChar */
+#define addCharConf(bcname,funcname) HPMi->addConf(HPMi->pid,HPCT_CHAR,bcname,funcname)
/* HPMi->addPCGPermission */
#define addGroupPermission(pcgname,maskptr) HPMi->addPCGPermission(HPMi->pid,pcgname,&maskptr)