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 {