diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-04-04 14:15:49 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-04-04 14:15:49 +0000 |
commit | 2b9d6d3e1fe89fe25fd79f57d283ee7aa4994a80 (patch) | |
tree | 611c5caf15e5161b5b99052efae8aa724f9231d8 /src/login/login.c | |
parent | 682882cb92160a1fd939a58488feea91543ab013 (diff) | |
download | hercules-2b9d6d3e1fe89fe25fd79f57d283ee7aa4994a80.tar.gz hercules-2b9d6d3e1fe89fe25fd79f57d283ee7aa4994a80.tar.bz2 hercules-2b9d6d3e1fe89fe25fd79f57d283ee7aa4994a80.tar.xz hercules-2b9d6d3e1fe89fe25fd79f57d283ee7aa4994a80.zip |
* Removed anti-freeze system for login and char
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1396 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/login/login.c')
-rw-r--r-- | src/login/login.c | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/login/login.c b/src/login/login.c index d9858065e..bacf7a354 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -82,9 +82,6 @@ int display_parse_fromchar = 0; // 0: no, 1: yes (without packet 0x2714), 2: all struct mmo_char_server server[MAX_SERVERS]; int server_fd[MAX_SERVERS]; -int server_freezeflag[MAX_SERVERS]; // Char-server anti-freeze system. Counter. 5 ok, 4...0 freezed -int anti_freeze_enable = 0; -int ANTI_FREEZE_INTERVAL = 15; int login_fd; @@ -1260,32 +1257,6 @@ int mmo_auth(struct mmo_account* account, int fd) { return -1; // account OK } -//------------------------------- -// Char-server anti-freeze system -//------------------------------- -int char_anti_freeze_system(int tid, unsigned int tick, int id, int data) { - int i; - - //printf("Entering in char_anti_freeze_system function to check freeze of servers.\n"); - for(i = 0; i < MAX_SERVERS; i++) { - if (server_fd[i] >= 0) {// if char-server is online - //printf("char_anti_freeze_system: server #%d '%s', flag: %d.\n", i, server[i].name, server_freezeflag[i]); - if (server_freezeflag[i]-- < 1) { // Char-server anti-freeze system. Counter. 5 ok, 4...0 freezed - printf("Char-server anti-freeze system: char-server #%d '%s' is freezed -> disconnection.\n", i, server[i].name); - login_log("Char-server anti-freeze system: char-server #%d '%s' is freezed -> disconnection." RETCODE, - i, server[i].name); - session[server_fd[i]]->eof = 1; - } else { - // send alive packet to check connection - WFIFOW(server_fd[i],0) = 0x2718; - WFIFOSET(server_fd[i],2); - } - } - } - - return 0; -} - //-------------------------------- // Packet parsing for char-servers //-------------------------------- @@ -1392,9 +1363,6 @@ int parse_fromchar(int fd) { return 0; //printf("parse_fromchar: Receiving of the users number of the server '%s': %d\n", server[id].name, RFIFOL(fd,2)); server[id].users = RFIFOL(fd,2); - if(anti_freeze_enable) - server_freezeflag[id] = 5; // Char anti-freeze system. Counter. 5 ok, 4...0 freezed - // send some answer WFIFOW(fd,0) = 0x2718; WFIFOSET(fd,2); @@ -3060,8 +3028,6 @@ int parse_login(int fd) { server[account.account_id].maintenance = RFIFOW(fd,82); server[account.account_id].new_ = RFIFOW(fd,84); server_fd[account.account_id] = fd; - if(anti_freeze_enable) - server_freezeflag[account.account_id] = 5; // Char-server anti-freeze system. Counter. 5 ok, 4...0 freezed WFIFOW(fd,0) = 0x2711; WFIFOB(fd,2) = 0; WFIFOSET(fd,3); @@ -3083,10 +3049,8 @@ int parse_login(int fd) { if (server_fd[account.account_id] != -1) { printf("Connection of the char-server '%s' REFUSED - already connected (account: %ld-%s, pass: %s, ip: %s)\n", server_name, account.account_id, account.userid, account.passwd, ip); - printf("You must probably wait that the freeze system detect the disconnection.\n"); login_log("Connexion of the char-server '%s' REFUSED - already connected (account: %ld-%s, pass: %s, ip: %s)" RETCODE, server_name, account.account_id, account.userid, account.passwd, ip); - login_log("You must probably wait that the freeze system detect the disconnection." RETCODE); } else { printf("Connection of the char-server '%s' REFUSED (account: %s, pass: %s, ip: %s).\n", server_name, account.userid, account.passwd, ip); login_log("Connexion of the char-server '%s' REFUSED (account: %s, pass: %s, ip: %s)" RETCODE, @@ -3556,13 +3520,6 @@ int login_config_read(const char *cfgName) { dynamic_pass_failure_ban_how_many = atoi(w2); } else if (strcmpi(w1, "dynamic_pass_failure_ban_how_long") == 0) { dynamic_pass_failure_ban_how_long = atoi(w2); - // Anti-Freeze - } else if(strcmpi(w1,"anti_freeze_enable")==0){ - anti_freeze_enable = config_switch(w2); - } else if (strcmpi(w1, "anti_freeze_interval") == 0) { - ANTI_FREEZE_INTERVAL = atoi(w2); - if (ANTI_FREEZE_INTERVAL < 5) - ANTI_FREEZE_INTERVAL = 5; // minimum 5 seconds } else if (strcmpi(w1, "import") == 0) { login_config_read(w2); } else if(strcmpi(w1,"imalive_on")==0) { //Added by Mugendai for I'm Alive mod @@ -3980,10 +3937,6 @@ int do_init(int argc, char **argv) { //login_fd = make_listen_port(login_port); login_fd = make_listen_bind(bind_ip,login_port); - if(anti_freeze_enable > 0) { - add_timer_func_list(char_anti_freeze_system, "char_anti_freeze_system"); - i = add_timer_interval(gettick() + 1000, char_anti_freeze_system, 0, 0, ANTI_FREEZE_INTERVAL * 1000); - } add_timer_func_list(check_auth_sync, "check_auth_sync"); i = add_timer_interval(gettick() + 60000, check_auth_sync, 0, 0, 60000); // every 60 sec we check if we must save accounts file (only if necessary to save) |