From 21b9da17bd3c9298f00d690c5f8280ee99352a14 Mon Sep 17 00:00:00 2001 From: Jens van de Wiel <85284773+JensvandeWiel@users.noreply.github.com> Date: Mon, 13 Nov 2023 16:38:26 +0100 Subject: [PATCH] removed unecesariy code (#111) --- server/helpers.go | 3 +-- server/server_controller.go | 12 ------------ 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/server/helpers.go b/server/helpers.go index 9d7eb31..ae7c6cc 100644 --- a/server/helpers.go +++ b/server/helpers.go @@ -14,8 +14,7 @@ import ( ) var iniOpts = ini.LoadOptions{ - AllowShadows: true, - AllowDuplicateShadowValues: true, + AllowShadows: true, } // findHighestKey returns the highest key in a map with int as key diff --git a/server/server_controller.go b/server/server_controller.go index 0cda731..f90cff9 100644 --- a/server/server_controller.go +++ b/server/server_controller.go @@ -290,18 +290,6 @@ func (c *ServerController) createServer(saveToConfig bool) (int, *Server, error) // saveServer saves the server, and returns an error if it fails func (c *ServerController) saveServer(server *Server) error { - - server.GameUserSettings.ServerSettings.RCONEnabled = true - server.GameUserSettings.ServerSettings.RCONPort = server.RCONPort - server.GameUserSettings.ServerSettings.ServerAdminPassword = server.AdminPassword - - server.GameUserSettings.SessionSettings.MultiHome = server.IpAddress - server.GameUserSettings.SessionSettings.Port = server.ServerPort - server.GameUserSettings.SessionSettings.QueryPort = server.QueryPort - server.GameUserSettings.SessionSettings.SessionName = server.ServerName - server.GameUserSettings.MultiHome.MultiHome = true - server.GameUserSettings.ScriptEngineGameSession.MaxPlayers = server.MaxPlayers - // Check if server is correct. if err := CheckIfServerCorrect(*server); err != nil { return fmt.Errorf("Parsing server instance failed: " + err.Error())