From 164a8a1ad82d6404b892eb8ae90927c58bbc26ce Mon Sep 17 00:00:00 2001 From: jake Date: Fri, 30 Oct 2020 21:20:28 -0600 Subject: [PATCH] disable duplicate account checking since its super bugged --- src/login/login.rs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/login/login.rs b/src/login/login.rs index 6066dd2..1683977 100644 --- a/src/login/login.rs +++ b/src/login/login.rs @@ -58,15 +58,15 @@ impl SendServerPacket for SendLoginPacket { } } - pub async fn get_login_status(entity_gateway: &impl EntityGateway, pkt: &Login) -> Result { let username = array_to_utf8(pkt.username).map_err(|_err| AccountStatus::Error)?; let password = array_to_utf8(pkt.password).map_err(|_err| AccountStatus::Error)?; let user = entity_gateway.get_user_by_name(username).await.map_err(|_| AccountStatus::InvalidUser)?; - if user.is_currently_online() { + /*if user.is_currently_online() { return Err(AccountStatus::AlreadyOnline) - } + }*/ + log::info!("user: {}, activated {}", user.username, user.activated); if !user.activated { return Err(AccountStatus::PayUp) } @@ -84,12 +84,15 @@ pub async fn get_login_status(entity_gateway: &impl EntityGateway, pkt: &Login) } pub fn check_if_already_online(user: UserAccountEntity) -> Result { + Ok(user) + /* if user.is_currently_online() { - Err(AccountStatus::PayUp) - } + Err(AccountStatus::PayUp) +} else { - Ok(user) - } + Ok(user) +} + */ } pub struct LoginServerState {