From 463c29819f88513883e8b0b26875da54c1758f16 Mon Sep 17 00:00:00 2001
From: ItsMePepijn <68758035+ItsMePepijn@users.noreply.github.com>
Date: Sun, 12 Nov 2023 11:16:43 +0100
Subject: [PATCH] fixed build failing
---
frontend/src/pages/Server.tsx | 4 ++--
frontend/src/pages/server/Administration.tsx | 2 +-
server/server.go | 6 +++++-
server/server_controller.go | 2 ++
4 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/frontend/src/pages/Server.tsx b/frontend/src/pages/Server.tsx
index ad3a828..70d6095 100644
--- a/frontend/src/pages/Server.tsx
+++ b/frontend/src/pages/Server.tsx
@@ -23,8 +23,8 @@ import {
SaveServer,
StartServer,
SetServerStatus,
- HandleServerCrash
- StartServer, StopServer
+ HandleServerCrash,
+ StopServer
} from "../../wailsjs/go/server/ServerController";
import {InstallUpdater} from "./InstallUpdater";
import {useAlert} from "../components/AlertProvider";
diff --git a/frontend/src/pages/server/Administration.tsx b/frontend/src/pages/server/Administration.tsx
index 63df512..bb6fe96 100644
--- a/frontend/src/pages/server/Administration.tsx
+++ b/frontend/src/pages/server/Administration.tsx
@@ -171,7 +171,7 @@ export function Administration({setServ, serv, onServerFilesDeleted}: Props) {
setServ((p) => ({ ...p, disableUpdateOnStart: e.target.checked, convertValues: p.convertValues }))} />
- setServ((p) => ({ ...p, restartOnServerQuit: e.target.checked }))} />
+ setServ((p) => ({ ...p, restartOnServerQuit: e.target.checked, convertValues: p.convertValues }))} />
Custom server "dash" arguments (only use args like: -EnableIdlePlayerKick -ForceAllowCaveFlyers)
setServ((p) => ({ ...p, extraDashArgs: e.target.value, convertValues: p.convertValues }))}>
diff --git a/server/server.go b/server/server.go
index 6ac7a02..cefc255 100644
--- a/server/server.go
+++ b/server/server.go
@@ -9,6 +9,8 @@ import (
"strconv"
"strings"
"time"
+
+ "github.com/JensvandeWiel/ArkAscendedServerManager/helpers"
"github.com/keybase/go-ps"
"github.com/wailsapp/wails/v2/pkg/runtime"
)
@@ -19,6 +21,7 @@ type Server struct {
Command *exec.Cmd `json:"-"`
ctx context.Context
IsRunning bool `json:"-"`
+ helpers *helpers.HelpersController
//PREFERENCES
@@ -122,7 +125,7 @@ func (s *Server) Start() error {
runtime.EventsEmit(s.ctx, "onServerStart", s.Id)
s.SetStatus(true)
-
+
if s.DiscordWebHookEnabled {
err := helpers.SendToDiscord(time.Now().Format(time.RFC822)+" ("+s.ServerAlias+") Server has started", s.DiscordWebHook)
if err != nil {
@@ -158,6 +161,7 @@ func (s *Server) HandleCrash() {
}
}
}
+}
// CreateServerCmd returns the command to start the server
func (s *Server) CreateServerCmd() *exec.Cmd {
diff --git a/server/server_controller.go b/server/server_controller.go
index bd09844..3f12d99 100644
--- a/server/server_controller.go
+++ b/server/server_controller.go
@@ -19,6 +19,7 @@ import (
"path"
"strconv"
+ "github.com/JensvandeWiel/ArkAscendedServerManager/helpers"
"github.com/adrg/xdg"
"github.com/wailsapp/wails/v2/pkg/runtime"
)
@@ -347,6 +348,7 @@ func (c *ServerController) HandleServerCrash(id int) error {
server.HandleCrash()
return nil
+}
func (c *ServerController) GetServerStartupCommand(id int) (string, error) {
server, err := c.GetServerWithError(id, false)