From a4f67d91419acc291c9f8f72c3a9e774e4671a97 Mon Sep 17 00:00:00 2001 From: KyoZM Date: Sat, 12 Oct 2019 18:20:37 -0300 Subject: [PATCH] proper message on permission check failure for commands --- server/src/cmd.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/src/cmd.rs b/server/src/cmd.rs index 85409b4893..0c0fa4d502 100644 --- a/server/src/cmd.rs +++ b/server/src/cmd.rs @@ -61,8 +61,9 @@ impl ChatCommand { if !server.entity_is_admin(entity) { server.clients.notify( entity, - ServerMsg::private(String::from( - "Unavailable command '/{}'.\nType '/help' for available commands", + ServerMsg::private(format!( + "You don't have permission to use '/{}'.", + self.keyword )), ); return;