|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
use crate::game::Game;
|
|
|
|
|
use crate::queue::SendQueue;
|
|
|
|
|
use crate::result::RudeResult;
|
|
|
|
|
use crate::state::State;
|
|
|
|
|
use crate::try_log;
|
|
|
|
|
|
|
|
|
|
impl Game {
|
|
|
|
@ -36,14 +37,15 @@ impl Game {
|
|
|
|
|
client.send_with_prompt(message);
|
|
|
|
|
} else {
|
|
|
|
|
client.send_without_prompt(&message);
|
|
|
|
|
if message == "Goodbye\n\n".to_string() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if state == Some(State::Quit) {
|
|
|
|
|
let _ = client.close();
|
|
|
|
|
log::info!("Disconnect from {}", client);
|
|
|
|
|
self.clients.remove(&token);
|
|
|
|
|
self.tokens.push_back(token);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Ok(true)
|
|
|
|
|
}
|
|
|
|
|