one more admin command

This commit is contained in:
2018-09-24 23:09:37 +02:00
parent 8e4c088e85
commit 02d8654780

View File

@@ -791,5 +791,24 @@ namespace reallife_gamemode.Server.Commands
player.Position = playerPosition;
}
}
[Command("ip", "~m~Benutzung: ~s~/ip [Spieler]")]
public void CmdAdminIp(Client player, string targetname)
{
if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true)
{
ChatService.NotAuthorized(player);
return;
}
Client target = ClientService.GetClientByName(targetname);
if (target == null)
{
ChatService.PlayerNotFound(target);
return;
}
player.SendChatMessage("IP von " + NAPI.Player.GetPlayerName(target) + ": " + target.Address);
}
}
}