diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-11-10 14:29:38 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-11-15 19:07:53 +0300 |
commit | 1321924c691d4ba9e52908626b450006fa69dfc6 (patch) | |
tree | 8afcc0900a62387ade1ddc1c98b278b05b4d488a | |
parent | dc7762f799e1c5383cff7e746cfdb24a0e92f3a5 (diff) | |
download | hercules-1321924c691d4ba9e52908626b450006fa69dfc6.tar.gz hercules-1321924c691d4ba9e52908626b450006fa69dfc6.tar.bz2 hercules-1321924c691d4ba9e52908626b450006fa69dfc6.tar.xz hercules-1321924c691d4ba9e52908626b450006fa69dfc6.zip |
Add support for plugin options in char server config.
-rw-r--r-- | src/char/char.c | 2 | ||||
-rw-r--r-- | src/common/HPMi.h | 5 |
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) |