summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-10 15:16:39 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-15 19:08:35 +0300
commit8c1c2d1a6c8557dfcce27a37f9c7a7bbef82d7a0 (patch)
treea4b6a1357e648b4a56e4e6f48999e488e887ac44
parent1321924c691d4ba9e52908626b450006fa69dfc6 (diff)
downloadhercules-8c1c2d1a6c8557dfcce27a37f9c7a7bbef82d7a0.tar.gz
hercules-8c1c2d1a6c8557dfcce27a37f9c7a7bbef82d7a0.tar.bz2
hercules-8c1c2d1a6c8557dfcce27a37f9c7a7bbef82d7a0.tar.xz
hercules-8c1c2d1a6c8557dfcce27a37f9c7a7bbef82d7a0.zip
Add support for plugin options in char server config (inter-server.conf).
-rw-r--r--src/char/char.c3
-rw-r--r--src/common/HPMi.h9
2 files changed, 8 insertions, 4 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 3bfef8762..bf6019ad5 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -5604,10 +5604,11 @@ void char_sql_config_read(const char* cfgName)
safestrncpy(acc_reg_str_db, w2, sizeof(acc_reg_str_db));
else if(!strcmpi(w1,"acc_reg_num_db"))
safestrncpy(acc_reg_num_db, w2, sizeof(acc_reg_num_db));
-
//support the import command, just like any other config
else if(!strcmpi(w1,"import"))
chr->sql_config_read(w2);
+ else
+ HPM->parseConf(w1, w2, HPCT_CHAR_INTER);
}
fclose(fp);
ShowInfo("Done reading %s.\n", cfgName);
diff --git a/src/common/HPMi.h b/src/common/HPMi.h
index 12eee94f4..945f0fec1 100644
--- a/src/common/HPMi.h
+++ b/src/common/HPMi.h
@@ -84,9 +84,10 @@ enum HPluginDataTypes {
/* used in macros and conf storage */
enum HPluginConfType {
- HPCT_BATTLE, /* battle-conf (map-server */
- HPCT_LOGIN, /* login-server.conf (login-server) */
- HPCT_CHAR, /* char-server.conf (char-server) */
+ HPCT_BATTLE, /* battle-conf (map-server */
+ HPCT_LOGIN, /* login-server.conf (login-server) */
+ HPCT_CHAR, /* char-server.conf (char-server) */
+ HPCT_CHAR_INTER, /* inter-server.conf (char-server) */
HPCT_MAX,
};
@@ -163,6 +164,8 @@ enum HPluginConfType {
#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->addCharInter */
+#define addCharInterConf(bcname,funcname) HPMi->addConf(HPMi->pid,HPCT_SQL,bcname,funcname)
/* HPMi->addPCGPermission */
#define addGroupPermission(pcgname,maskptr) HPMi->addPCGPermission(HPMi->pid,pcgname,&maskptr)