diff options
author | codemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-01-01 00:35:25 +0000 |
---|---|---|
committer | codemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-01-01 00:35:25 +0000 |
commit | d80c8a047666856947981a91a4fbf401d87ec732 (patch) | |
tree | 18e549388b94069e8ebec6c67b78b4cb5a236ef2 /src/char/char.c | |
parent | 58387b80ea89b7f7662ec9ef3d865a6b77344223 (diff) | |
download | hercules-d80c8a047666856947981a91a4fbf401d87ec732.tar.gz hercules-d80c8a047666856947981a91a4fbf401d87ec732.tar.bz2 hercules-d80c8a047666856947981a91a4fbf401d87ec732.tar.xz hercules-d80c8a047666856947981a91a4fbf401d87ec732.zip |
* Added a char config that allows GMs that have a certain level or above to bypass the server's user limit [Codemaster] [SVN 885]
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@885 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char/char.c')
-rw-r--r-- | src/char/char.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/char/char.c b/src/char/char.c index e812e1de1..f2d4b33d2 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -103,6 +103,7 @@ int char_id_count = 150000; struct mmo_charstatus *char_dat; int char_num, char_max; int max_connect_user = 0; +int gm_allow_level = 99; int autosave_interval = DEFAULT_AUTOSAVE_INTERVAL; int start_zeny = 500; int start_weapon = 1201; @@ -1660,6 +1661,10 @@ int parse_tologin(int fd) { sd->connect_until_time = (time_t)RFIFOL(fd,47); // send characters to player mmo_char_send006b(i, sd); + } else if(isGM(sd->account_id) >= gm_allow_level) { + sd->connect_until_time = (time_t)RFIFOL(fd,47); + // send characters to player + mmo_char_send006b(i, sd); } else { // refuse connection: too much online players // printf("count_users(): %d < max_connect_use (%d) -> fail...\n", count_users(), max_connect_user); @@ -3216,6 +3221,10 @@ int char_config_read(const char *cfgName) { max_connect_user = atoi(w2); if (max_connect_user < 0) max_connect_user = 0; // unlimited online players + } else if(strcmpi(w1, "gm_allow_level") == 0) { + gm_allow_level = atoi(w2); + if(gm_allow_level < 0) + gm_allow_level = 99; } else if (strcmpi(w1, "check_ip_flag") == 0) { check_ip_flag = config_switch(w2); } else if (strcmpi(w1, "autosave_time") == 0) { |