summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-10 12:58:38 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-15 19:26:02 +0300
commit9f785590a3a3b6e34fe698605eb858ca3ea01485 (patch)
treefca03726b3e7cd086f855cc4ec205b12e980e1ea /src
parent47565d423f40f4fbbbb032dcc6fa2f6670bfafab (diff)
downloadhercules-9f785590a3a3b6e34fe698605eb858ca3ea01485.tar.gz
hercules-9f785590a3a3b6e34fe698605eb858ca3ea01485.tar.bz2
hercules-9f785590a3a3b6e34fe698605eb858ca3ea01485.tar.xz
hercules-9f785590a3a3b6e34fe698605eb858ca3ea01485.zip
Add support for plugin options in login server config.
Diffstat (limited to 'src')
-rw-r--r--src/common/HPMi.h3
-rw-r--r--src/login/login.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/common/HPMi.h b/src/common/HPMi.h
index a7435b437..49a6b7c37 100644
--- a/src/common/HPMi.h
+++ b/src/common/HPMi.h
@@ -85,6 +85,7 @@ enum HPluginDataTypes {
/* used in macros and conf storage */
enum HPluginConfType {
HPCT_BATTLE, /* battle-conf (map-server */
+ HPCT_LOGIN, /* login-server.conf (login-server) */
HPCT_MAX,
};
@@ -157,6 +158,8 @@ enum HPluginConfType {
#define addPacket(cmd,len,receive,point) HPMi->addPacket(cmd,len,receive,point,HPMi->pid)
/* HPMi->addBattleConf */
#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->addPCGPermission */
#define addGroupPermission(pcgname,maskptr) HPMi->addPCGPermission(HPMi->pid,pcgname,&maskptr)
diff --git a/src/login/login.c b/src/login/login.c
index b9de09fcd..2cda77819 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -1840,6 +1840,8 @@ int login_config_read(const char* cfgName)
}
else if(!strcmpi(w1, "import"))
login_config_read(w2);
+ else if(HPM->parseConf(w1, w2, HPCT_LOGIN))
+ ; // handled by plugin
else
{
AccountDB* db = account_engine[0].db;