From 6865894f96d89506a93e80f9c1c8e036b1511d8d Mon Sep 17 00:00:00 2001 From: Prashan Dharmasena Date: Fri, 29 May 2020 18:36:52 -0700 Subject: [PATCH] Closes #573. Do not announce alias change for non-body players. --- server/src/cmd.rs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/server/src/cmd.rs b/server/src/cmd.rs index c36cca92dc..512769861e 100644 --- a/server/src/cmd.rs +++ b/server/src/cmd.rs @@ -358,12 +358,16 @@ fn handle_alias( player.alias.clone(), )); server.state.notify_registered_clients(msg); - server - .state - .notify_registered_clients(ServerMsg::broadcast(format!( - "{} is now known as {}.", - old_alias, player.alias - ))); + + // Announce alias change if target has a Body. + if ecs.read_storage::().get(target).is_some() { + server + .state + .notify_registered_clients(ServerMsg::broadcast(format!( + "{} is now known as {}.", + old_alias, player.alias + ))); + } } } else { server.notify_client(