Add in some final touches

This commit is contained in:
zontreck 2024-05-24 14:09:13 -07:00
parent 0181ea4cf8
commit ca57807ccb

View file

@ -124,7 +124,8 @@ class StateMachine {
"-RconPort=${settings.inst!.serverSettings.RconPort}", "-RconPort=${settings.inst!.serverSettings.RconPort}",
"-Port=${settings.inst!.serverSettings.GamePort}", "-Port=${settings.inst!.serverSettings.GamePort}",
"-QueryPort=${settings.inst!.serverSettings.QueryPort}", "-QueryPort=${settings.inst!.serverSettings.QueryPort}",
"-log" "-log",
"-console"
]; ];
// Start the server now // Start the server now
if (Platform.isWindows) { if (Platform.isWindows) {
@ -182,6 +183,10 @@ class StateMachine {
if (settings.inst!.pterodactylMode) { if (settings.inst!.pterodactylMode) {
// Shut down the server processes now // Shut down the server processes now
PacketServer.socket!.close(); PacketServer.socket!.close();
} else {
resetKillswitch();
SessionData.timer = settings.inst!.timer.time.copy();
changeState(States.PreStart);
} }
break; break;
} }
@ -206,6 +211,10 @@ class StateMachine {
if (send) { if (send) {
// Send the alert message // Send the alert message
SessionData.CURRENT_INTERVAL = current;
if (current.type == WarnType.Intrusive) {
settings.sendRconCommand("broadcast ${current.warning}");
}
} }
// Check Shutdown Pending // Check Shutdown Pending