From c38f0ab54c6d03f002f0be14bc5e17337f81c9a5 Mon Sep 17 00:00:00 2001 From: gumi Date: Thu, 10 Jan 2019 16:13:29 -0500 Subject: completely remove the auth fifo queue in login server it isn't even being used anymore --- src/login/fwd.hpp | 1 - src/login/globals.cpp | 3 --- src/login/globals.hpp | 1 - src/login/login.cpp | 39 --------------------------------------- src/login/login.hpp | 11 ----------- 5 files changed, 55 deletions(-) diff --git a/src/login/fwd.hpp b/src/login/fwd.hpp index 6516404..4de09f1 100644 --- a/src/login/fwd.hpp +++ b/src/login/fwd.hpp @@ -39,7 +39,6 @@ namespace login { struct LoginConf; struct LoginLanConf; - struct AuthFifo; struct mmo_char_server; struct AuthData; // meh, add more when I feel like it diff --git a/src/login/globals.cpp b/src/login/globals.cpp index 0c8a150..4df9eda 100644 --- a/src/login/globals.cpp +++ b/src/login/globals.cpp @@ -42,9 +42,6 @@ namespace tmwa Array server_freezeflag; Session *login_session; // minimum level of player/GM (0: player, 1-99: gm) to connect on the server - Array auth_fifo; - // TODO replace with auto_fifo_it - int auth_fifo_pos = 0; std::vector auth_data; // TODO make this just be Map Map gm_account_db; diff --git a/src/login/globals.hpp b/src/login/globals.hpp index 541ea98..25f5c40 100644 --- a/src/login/globals.hpp +++ b/src/login/globals.hpp @@ -39,7 +39,6 @@ namespace tmwa extern Array server_session; extern Array server_freezeflag; extern Session *login_session; - extern Array auth_fifo; extern int auth_fifo_pos; extern std::vector auth_data; extern Map gm_account_db; diff --git a/src/login/login.cpp b/src/login/login.cpp index 2f9b756..49c2438 100644 --- a/src/login/login.cpp +++ b/src/login/login.cpp @@ -1002,12 +1002,6 @@ void parse_fromchar(Session *s) { send_fpacket<0x2731, 11>(ss, fixed_31); } - - for (int j = 0; j < AUTH_FIFO_SIZE; j++) - { - if (auth_fifo[j].account_id == acc) - auth_fifo[j].login_id1++; // to avoid reconnection error when come back from map-server (char-server will ask again the authentification) - } } ad.state = statut; } @@ -1078,12 +1072,6 @@ void parse_fromchar(Session *s) { send_fpacket<0x2731, 11>(ss, fixed_31); } - - for (int j = 0; j < AUTH_FIFO_SIZE; j++) - { - if (auth_fifo[j].account_id == acc) - auth_fifo[j].login_id1++; // to avoid reconnection error when come back from map-server (char-server will ask again the authentification) - } } else { @@ -1623,11 +1611,6 @@ void parse_admin(Session *s) { send_fpacket<0x2731, 11>(ss, fixed_31); } - - for (int j = 0; j < AUTH_FIFO_SIZE; j++) - if (auth_fifo[j].account_id == - ad->account_id) - auth_fifo[j].login_id1++; // to avoid reconnection error when come back from map-server (char-server will ask again the authentification) } ad->state = statut; ad->error_message = error_message; @@ -1738,12 +1721,6 @@ void parse_admin(Session *s) if (ad->sex != sex) { fixed_3d.account_id = ad->account_id; - for (int j = 0; j < AUTH_FIFO_SIZE; j++) - { - if (auth_fifo[j].account_id == - ad->account_id) - auth_fifo[j].login_id1++; // to avoid reconnection error when come back from map-server (char-server will ask again the authentification) - } ad->sex = sex; LOGIN_LOG("'ladmin': Modification of a sex (account: %s, new sex: %c, ip: %s)\n"_fmt, ad->userid, sex_to_char(sex), ip); @@ -2074,13 +2051,6 @@ void parse_admin(Session *s) { send_fpacket<0x2731, 11>(ss, fixed_31); } - - for (int j = 0; j < AUTH_FIFO_SIZE; j++) - { - if (auth_fifo[j].account_id == - ad->account_id) - auth_fifo[j].login_id1++; // to avoid reconnection error when come back from map-server (char-server will ask again the authentification) - } } ad->ban_until_time = timestamp; } @@ -2159,13 +2129,6 @@ void parse_admin(Session *s) { send_fpacket<0x2731, 11>(ss, fixed_31); } - - for (int j = 0; j < AUTH_FIFO_SIZE; j++) - { - if (auth_fifo[j].account_id == - ad->account_id) - auth_fifo[j].login_id1++; // to avoid reconnection error when come back from map-server (char-server will ask again the authentification) - } } ad->ban_until_time = timestamp; } @@ -3103,8 +3066,6 @@ int do_init(Slice argv) login::save_config_in_log(); runflag &= login::lan_check(); - for (int i = 0; i < login::AUTH_FIFO_SIZE; i++) - login::auth_fifo[i].delflag = 1; for (int i = 0; i < login::MAX_SERVERS; i++) login::server_session[i] = nullptr; diff --git a/src/login/login.hpp b/src/login/login.hpp index 5837cfb..05a02b4 100644 --- a/src/login/login.hpp +++ b/src/login/login.hpp @@ -71,16 +71,5 @@ struct mmo_char_server uint16_t port; uint16_t users; }; - -struct AuthFifo -{ - AccountId account_id; - int login_id1, login_id2; - IP4Address ip; - SEX sex; - int delflag; - int consumed_by; - ClientVersion client_version; -}; } // namespace login } // namespace tmwa -- cgit v1.2.3-60-g2f50