diff -r 216d39de1a44 -r 8a45c90f4580 rust/hedgewars-server/src/server/core.rs --- a/rust/hedgewars-server/src/server/core.rs Thu Feb 07 18:04:53 2019 +0300 +++ b/rust/hedgewars-server/src/server/core.rs Thu Feb 07 22:26:56 2019 +0300 @@ -1,14 +1,11 @@ use super::{ - actions, - actions::{Destination, PendingMessage}, client::HWClient, coretypes::{ClientId, RoomId}, - handlers, indexslab::IndexSlab, io::HWServerIO, room::HWRoom, }; -use crate::{protocol::messages::*, utils}; +use crate::utils; use log::*; use slab; @@ -45,7 +42,11 @@ pub fn remove_client(&mut self, client_id: ClientId) -> Option { let mut client = self.clients.remove(client_id); - if let Some(HWAnteClient { web_password: Some(ref mut password), ..}) = client { + if let Some(HWAnteClient { + web_password: Some(ref mut password), + .. + }) = client + { password.replace_range(.., "🦔🦔🦔🦔🦔🦔🦔🦔"); } client @@ -55,8 +56,6 @@ pub struct HWServer { pub clients: IndexSlab, pub rooms: Slab, - pub output: Vec<(Vec, HWServerMessage)>, - pub removed_clients: Vec, pub io: Box, pub anteroom: HWAnteroom, } @@ -68,8 +67,6 @@ Self { clients, rooms, - output: vec![], - removed_clients: vec![], io, anteroom: HWAnteroom::new(clients_limit), } @@ -83,10 +80,7 @@ } pub fn remove_client(&mut self, client_id: ClientId) { - self.removed_clients.push(client_id); - if self.clients.contains(client_id) { - self.clients.remove(client_id); - } + self.clients.remove(client_id); } pub fn add_room(&mut self) -> &mut HWRoom {