From b5528c2198d54028ef03d35d5aa4d7fdde6af8f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Wed, 14 Oct 2020 02:33:50 +0200 Subject: some changes --- mumd/src/command.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mumd/src/command.rs') diff --git a/mumd/src/command.rs b/mumd/src/command.rs index 8a5c715..0e5bdc7 100644 --- a/mumd/src/command.rs +++ b/mumd/src/command.rs @@ -27,7 +27,7 @@ pub enum CommandResponse { channels: HashMap, }, Status { - username: String, + username: Option, server_state: Server, } } @@ -41,11 +41,12 @@ pub async fn handle( while let Some(command) = command_receiver.recv().await { debug!("Parsing command {:?}", command); let mut state = state.lock().unwrap(); - let (wait_for_connected, _) = state.handle_command(command).await; + let (wait_for_connected, command_response) = state.handle_command(command).await; if wait_for_connected { let mut watcher = state.phase_receiver(); drop(state); while !matches!(watcher.recv().await.unwrap(), StatePhase::Connected) {} } + command_response_sender.send(command_response).unwrap(); } } -- cgit v1.2.1