Remove RCON from server stop functions - use direct process killing

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-09-10 19:25:58 +00:00
parent a9ae54d211
commit d026b436d8
4 changed files with 52 additions and 370 deletions

View file

@ -1167,11 +1167,11 @@ sub stop_server_without_decrypt
logger("Invalid IP:Port given $server_ip:$server_port.");
return 1;
}
#removed stopping with rcon. just kill PID
#Skip RCON - always kill processes directly for reliable server stops
if (is_screen_running_without_decrypt(SCREEN_TYPE_HOME, $home_id) == 1)
{
logger "Control protocol not responding. Using kill signal.";
logger "Stopping server with kill command (RCON disabled for reliability).";
system("cmd /C taskkill /f /fi 'PID eq $windows_pid' /T");
system('screen -wipe > /dev/null 2>&1');
logger "Server ID $home_id:Stopped server running on $server_ip:$server_port.";