details
This commit is contained in:
parent
ba6d33b081
commit
0b82e65061
1 changed files with 7 additions and 7 deletions
|
@ -73,7 +73,7 @@ async fn handle_new_user(
|
|||
addr: &SocketAddr,
|
||||
) -> Result<()> {
|
||||
// Create
|
||||
let new_user = Arc::new(Mutex::new(generate_new_user(&state)));
|
||||
let new_user = Arc::new(Mutex::new(generate_new_user(state)));
|
||||
|
||||
// Notify client of new username
|
||||
sender
|
||||
|
@ -85,18 +85,18 @@ async fn handle_new_user(
|
|||
|
||||
// Hydrate client
|
||||
// this should probably be combined and sent as one
|
||||
sender.send(Message::Text(chat_meta_update(&state))).await?;
|
||||
sender.send(Message::Text(chat_meta_update(state))).await?;
|
||||
sender.send(Message::Text(motd())).await?;
|
||||
sender
|
||||
.send(Message::Text(server_summary_update(&state)))
|
||||
.send(Message::Text(server_summary_update(state)))
|
||||
.await?;
|
||||
sender.send(Message::Text(games_update(&state))).await?;
|
||||
sender.send(Message::Text(games_update(state))).await?;
|
||||
|
||||
// Broadcast new user's existence
|
||||
// this should probably be combined and sent as one
|
||||
state.tx.send(announce_join(&state, addr))?;
|
||||
state.tx.send(server_summary_update(&state))?;
|
||||
state.tx.send(chat_meta_update(&state))?;
|
||||
state.tx.send(announce_join(state, addr))?;
|
||||
state.tx.send(server_summary_update(state))?;
|
||||
state.tx.send(chat_meta_update(state))?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue