* 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://svn.code.sf.net/p/rathena/svn/branches/stable@885 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
codemaster 2005-01-01 00:35:25 +00:00
parent 3d5fadb346
commit ef1ef6f616
4 changed files with 23 additions and 0 deletions

View File

@ -1,5 +1,7 @@
Date Added Date Added
01/01 01/01
* Added a char config that allows GMs that have a certain level or above to
bypass the server's user limit [Codemaster]
* Changed some create arrow outputs for new kRO 12/21/04 patch [Aria] * Changed some create arrow outputs for new kRO 12/21/04 patch [Aria]
* Fixed some respawn delays of MVP/Miniboss monsters. Redo Umbala/Niflheim fields, added missing mobs, corrected * Fixed some respawn delays of MVP/Miniboss monsters. Redo Umbala/Niflheim fields, added missing mobs, corrected
monsters quantity. In Niflheim fixed wrong Lord of Death monster ID. [Lupus] monsters quantity. In Niflheim fixed wrong Lord of Death monster ID. [Lupus]

View File

@ -59,6 +59,9 @@ char_new: 0
// Maximum users able to connect to the server. Set to 0 for unlimited. // Maximum users able to connect to the server. Set to 0 for unlimited.
max_connect_user: 0 max_connect_user: 0
// Minimum GM level that is allowed to bypass the server limit of users.
gm_allow_level: 99
// It's to check IP of a player between char-server and other servers (part of anti-hacking system) // It's to check IP of a player between char-server and other servers (part of anti-hacking system)
// If player doesn't have same IP, connection is refused. // If player doesn't have same IP, connection is refused.
// Set to 0/off/no to not check IP of player. // Set to 0/off/no to not check IP of player.

View File

@ -103,6 +103,7 @@ int char_id_count = 150000;
struct mmo_charstatus *char_dat; struct mmo_charstatus *char_dat;
int char_num, char_max; int char_num, char_max;
int max_connect_user = 0; int max_connect_user = 0;
int gm_allow_level = 99;
int autosave_interval = DEFAULT_AUTOSAVE_INTERVAL; int autosave_interval = DEFAULT_AUTOSAVE_INTERVAL;
int start_zeny = 500; int start_zeny = 500;
int start_weapon = 1201; int start_weapon = 1201;
@ -1660,6 +1661,10 @@ int parse_tologin(int fd) {
sd->connect_until_time = (time_t)RFIFOL(fd,47); sd->connect_until_time = (time_t)RFIFOL(fd,47);
// send characters to player // send characters to player
mmo_char_send006b(i, sd); 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 { } else {
// refuse connection: too much online players // refuse connection: too much online players
// printf("count_users(): %d < max_connect_use (%d) -> fail...\n", count_users(), max_connect_user); // 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); max_connect_user = atoi(w2);
if (max_connect_user < 0) if (max_connect_user < 0)
max_connect_user = 0; // unlimited online players 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) { } else if (strcmpi(w1, "check_ip_flag") == 0) {
check_ip_flag = config_switch(w2); check_ip_flag = config_switch(w2);
} else if (strcmpi(w1, "autosave_time") == 0) { } else if (strcmpi(w1, "autosave_time") == 0) {

View File

@ -136,6 +136,7 @@ int char_id_count = 150000;
struct mmo_charstatus *char_dat; struct mmo_charstatus *char_dat;
int char_num,char_max; int char_num,char_max;
int max_connect_user = 0; int max_connect_user = 0;
int gm_allow_level = 99;
int autosave_interval = DEFAULT_AUTOSAVE_INTERVAL; int autosave_interval = DEFAULT_AUTOSAVE_INTERVAL;
int start_zeny = 500; int start_zeny = 500;
int start_weapon = 1201; int start_weapon = 1201;
@ -1525,6 +1526,10 @@ int parse_tologin(int fd) {
sd->connect_until_time = (time_t)RFIFOL(fd,47); sd->connect_until_time = (time_t)RFIFOL(fd,47);
// send characters to player // send characters to player
mmo_char_send006b(i, sd); 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 { } else {
// refuse connection: too much online players // refuse connection: too much online players
// printf("count_users(): %d < max_connect_use (%d) -> fail...\n", count_users(), max_connect_user); // printf("count_users(): %d < max_connect_use (%d) -> fail...\n", count_users(), max_connect_user);
@ -3167,6 +3172,10 @@ int char_config_read(const char *cfgName) {
max_connect_user = atoi(w2); max_connect_user = atoi(w2);
if (max_connect_user < 0) if (max_connect_user < 0)
max_connect_user = 0; // unlimited online players 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) { } else if (strcmpi(w1, "check_ip_flag") == 0) {
check_ip_flag = config_switch(w2); check_ip_flag = config_switch(w2);
} else if (strcmpi(w1, "autosave_time") == 0) { } else if (strcmpi(w1, "autosave_time") == 0) {