Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Commit

Permalink
removed unecesariy code (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
JensvandeWiel authored Nov 13, 2023
1 parent fd8b9bd commit 21b9da1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
3 changes: 1 addition & 2 deletions server/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 0 additions & 12 deletions server/server_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 21b9da1

Please sign in to comment.