Phase 3: Update remaining code references (classes, constants, functions)

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-09-08 15:53:33 +00:00
parent 4b771d498f
commit d692485a08
188 changed files with 338 additions and 338 deletions

View file

@ -103,7 +103,7 @@ print_r($file_replacements);
echo "</xmp>"; */
require_once('includes/lib_remote.php');
$remote = new OGPRemoteLibrary($server_home['agent_ip'], $server_home['agent_port'], $server_home['encryption_key'], $server_home['timeout']);
$remote = new GSPRemoteLibrary($server_home['agent_ip'], $server_home['agent_port'], $server_home['encryption_key'], $server_home['timeout']);
foreach($file_replacements as $filepath => $replacements)
{

View file

@ -16,14 +16,14 @@ if (!$home_id || !$mod_id) {
$db = getOGPDBInstance(); // Replace with your DB instance
$home_info = $db->getGameHome($home_id);
$server_xml = read_server_config(SERVER_CONFIG_LOCATION."/".$home_info['home_cfg_file']);
$remote = new OGPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
$remote = new GSPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
$home_log = "";
if( isset( $server_xml->console_log ) ) {
$log_path = preg_replace("/%mod%/i", $home_info['mods'][$mod_id]['mod_key'], $server_xml->console_log);
$log_retval = $remote->remote_readfile( $home_info['home_path'].'/'.$log_path, $home_log );
} else {
$log_retval = $remote->get_log(OGP_SCREEN_TYPE_HOME, $home_info['home_id'], clean_path($home_info['home_path']."/".$server_xml->exe_location), $home_log);
$log_retval = $remote->get_log(GSP_SCREEN_TYPE_HOME, $home_info['home_id'], clean_path($home_info['home_path']."/".$server_xml->exe_location), $home_log);
}
$lines = explode("\n", $home_log);
$home_log = implode("\n", array_slice($lines, -40));

View file

@ -32,7 +32,7 @@ function get_start_cmd($remote,$server_xml,$home_info,$mod_id,$ip,$port,$db)
$cli_param_data['IP'] = $ip;
$cli_param_data['PORT'] = $port;
$cli_param_data['HOSTNAME'] = $home_info['home_name'];
$cli_param_data['PID_FILE'] = "ogp_game_startup.pid";
$cli_param_data['PID_FILE'] = "gsp_game_startup.pid";
// Linux
if( preg_match("/Linux/", $os) )
@ -217,7 +217,7 @@ function exec_operation( $action, $home_id, $mod_id, $ip, $port, $override = fal
return FALSE;
require_once('includes/lib_remote.php');
$remote = new OGPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
$remote = new GSPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
$os = $remote->what_os();
if ( $action != "stop" )
@ -231,7 +231,7 @@ function exec_operation( $action, $home_id, $mod_id, $ip, $port, $override = fal
}
}
$screen_running = $remote->is_screen_running(OGP_SCREEN_TYPE_HOME,$home_info['home_id']) === 1;
$screen_running = $remote->is_screen_running(GSP_SCREEN_TYPE_HOME,$home_info['home_id']) === 1;
if ( $action == "stop" AND $screen_running )
{

View file

@ -42,20 +42,20 @@ require_once("modules/config_games/server_config_parser.php");
}
require_once('includes/lib_remote.php');
$remote = new OGPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
$remote = new GSPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
$home_log = "";
if( isset( $server_xml->console_log ) )
{
$log_retval = $remote->get_log(OGP_SCREEN_TYPE_HOME,
$log_retval = $remote->get_log(GSP_SCREEN_TYPE_HOME,
$home_info['home_id'],
clean_path($home_info['home_path']),
$home_log, 100, (string) $server_xml->console_log);
}
else
{
$log_retval = $remote->get_log(OGP_SCREEN_TYPE_HOME,
$log_retval = $remote->get_log(GSP_SCREEN_TYPE_HOME,
$home_info['home_id'],
clean_path($home_info['home_path']."/".$server_xml->exe_location),
$home_log);

View file

@ -294,7 +294,7 @@ elseif($server_home['home_id'] == $_POST['home_id'])
$cli_param_data['HOSTNAME'] = $server_home['home_name'];
$cli_param_data['PID_FILE'] = "ogp_game_startup.pid";
$cli_param_data['PID_FILE'] = "gsp_game_startup.pid";
$os = $remote->what_os();
@ -337,7 +337,7 @@ elseif($server_home['home_id'] == $_POST['home_id'])
// We do this check because sometimes server does not answer to lgsl check
// done below and is still running.
if ( $remote->is_screen_running(OGP_SCREEN_TYPE_HOME,$server_home['home_id']) === 1 )
if ( $remote->is_screen_running(GSP_SCREEN_TYPE_HOME,$server_home['home_id']) === 1 )
{
echo "<p>".get_lang_f('server_already_running')."<a href=?m=gamemanager&amp;p=stop&amp;home_id=".$server_home['home_id'].
"&amp;ip=".$ip."&amp;port=".

View file

@ -3,7 +3,7 @@
* Component of the gamemanager module
*/
function exec_ogp_module() {
function exec_gsp_module() {
global $db;

View file

@ -6,7 +6,7 @@
require_once('modules/gamemanager/home_handling_functions.php');
require_once("modules/config_games/server_config_parser.php");
require_once('includes/lib_remote.php');
function exec_ogp_module()
function exec_gsp_module()
{
global $db;
@ -99,7 +99,7 @@ function exec_ogp_module()
}
$remote_server_id = $server_home['remote_server_id'];
$rserver = $db->getRemoteServerById($remote_server_id);
$remote = new OGPRemoteLibrary($rserver['agent_ip'], $rserver['agent_port'], $rserver['encryption_key'], $rserver['timeout']);
$remote = new GSPRemoteLibrary($rserver['agent_ip'], $rserver['agent_port'], $rserver['encryption_key'], $rserver['timeout']);
$startup_file_exists = $remote->rfile_exists( "startups/".$ip."-".$port ) === 1;
$SrvCtrl = "<table class='srvctrl'><tr><td style='border:0;text-align:center;background:transparent'><a href='?m=gamemanager&amp;p=restart&amp;home_id=".
$home_id."&amp;mod_id=".$mod_id."&amp;ip=".$ip."&amp;port=".$port.

View file

@ -6,7 +6,7 @@
require_once('home_handling_functions.php');
require_once("modules/config_games/server_config_parser.php");
function exec_ogp_module() {
function exec_gsp_module() {
global $view,$db;
$ip = $_REQUEST['ip'];
@ -27,7 +27,7 @@ function exec_ogp_module() {
}
require_once('includes/lib_remote.php');
$remote = new OGPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
$remote = new GSPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
$os = $remote->what_os();
@ -66,7 +66,7 @@ function exec_ogp_module() {
}
else
{
$log_retval = $remote->get_log(OGP_SCREEN_TYPE_HOME,
$log_retval = $remote->get_log(GSP_SCREEN_TYPE_HOME,
$home_id,
clean_path($home_info['home_path']."/".$server_xml->exe_location),
$home_log);
@ -247,7 +247,7 @@ function exec_ogp_module() {
}
else
{
$screen_running = $remote->is_screen_running(OGP_SCREEN_TYPE_HOME,$home_id);
$screen_running = $remote->is_screen_running(GSP_SCREEN_TYPE_HOME,$home_id);
if ( $screen_running == 1 )
{
print("<p class='note'>".get_lang('restarting_server')."</p>");

View file

@ -96,7 +96,7 @@ function update_local_copies()
require_once("includes/lib_remote.php");
require_once("modules/config_games/server_config_parser.php");
function exec_ogp_module() {
function exec_gsp_module() {
//update_local_copies(); #Disabled until the rsync_sites.list file from master servers is corrected.
global $db,$view,$settings;
@ -134,7 +134,7 @@ function exec_ogp_module() {
$home_id = $home_info['home_id'];
$remote = new OGPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
$remote = new GSPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
$server_xml = read_server_config(SERVER_CONFIG_LOCATION."/".$home_info['home_cfg_file']);
if( isset($server_xml->lgsl_query_name) )
@ -172,12 +172,12 @@ function exec_ogp_module() {
echo "<h2>Update $home_info[home_name]</h2>";
if ( $remote->is_screen_running(OGP_SCREEN_TYPE_HOME,$home_id) == 1 )
if ( $remote->is_screen_running(GSP_SCREEN_TYPE_HOME,$home_id) == 1 )
{
print_failure( get_lang("server_running_cant_update") );
return;
}
$update_active = $remote->get_log(OGP_SCREEN_TYPE_UPDATE,
$update_active = $remote->get_log(GSP_SCREEN_TYPE_UPDATE,
// Note exec location should not be added here as the log is in root where rsync is executed.
$home_id,clean_path($home_info['home_path']),
$log_txt,30);

View file

@ -419,7 +419,7 @@ echo "<table id='servermonitor' class='tablesorter' data-sortlist='[[0,0],[3,1]]
//End
$remote = new OGPRemoteLibrary($server_home['agent_ip'], $server_home['agent_port'], $server_home['encryption_key'], $server_home['timeout']);
$remote = new GSPRemoteLibrary($server_home['agent_ip'], $server_home['agent_port'], $server_home['encryption_key'], $server_home['timeout']);
$host_stat = $remote->status_chk();
if( $host_stat === 1)
@ -429,8 +429,8 @@ echo "<table id='servermonitor' class='tablesorter' data-sortlist='[[0,0],[3,1]]
$displayIP = checkDisplayPublicIP($server_home['display_public_ip'], $ip);
$address = "";
$screen_running = $remote->is_screen_running(OGP_SCREEN_TYPE_HOME,$server_home['home_id']) === 1;
$update_in_progress = $remote->is_screen_running(OGP_SCREEN_TYPE_UPDATE,$server_home['home_id']) === 1;
$screen_running = $remote->is_screen_running(GSP_SCREEN_TYPE_HOME,$server_home['home_id']) === 1;
$update_in_progress = $remote->is_screen_running(GSP_SCREEN_TYPE_UPDATE,$server_home['home_id']) === 1;
if($screen_running)
{
// Check if the screen running the server is running.

View file

@ -6,7 +6,7 @@
require_once('home_handling_functions.php');
require_once("modules/config_games/server_config_parser.php");
function exec_ogp_module()
function exec_gsp_module()
{
global $db;
global $view;
@ -38,7 +38,7 @@ function exec_ogp_module()
echo "</h2>";
require_once('includes/lib_remote.php');
$remote = new OGPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
$remote = new GSPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
$server_xml = read_server_config(SERVER_CONFIG_LOCATION."/".$home_info['home_cfg_file']);
@ -88,7 +88,7 @@ function exec_ogp_module()
}
else
{
$log_retval = $remote->get_log(OGP_SCREEN_TYPE_HOME,
$log_retval = $remote->get_log(GSP_SCREEN_TYPE_HOME,
$home_info['home_id'],
clean_path($home_info['home_path']."/".$server_xml->exe_location),
$home_log);
@ -160,7 +160,7 @@ function exec_ogp_module()
else
$query_ip = $ip;
$running = $remote->is_screen_running(OGP_SCREEN_TYPE_HOME,$home_info['home_id']);
$running = $remote->is_screen_running(GSP_SCREEN_TYPE_HOME,$home_info['home_id']);
if ( $server_xml->lgsl_query_name )
{

View file

@ -6,7 +6,7 @@
require_once('home_handling_functions.php');
require_once("modules/config_games/server_config_parser.php");
function exec_ogp_module() {
function exec_gsp_module() {
global $view,$db;
@ -58,7 +58,7 @@ function exec_ogp_module() {
}
else
{
$remote = new OGPRemoteLibrary($rserver['agent_ip'],
$remote = new GSPRemoteLibrary($rserver['agent_ip'],
$rserver['agent_port'],
$rserver['encryption_key'],
$rserver['timeout']);

View file

@ -6,7 +6,7 @@
require_once("includes/lib_remote.php");
require_once("modules/config_games/server_config_parser.php");
function exec_ogp_module() {
function exec_gsp_module() {
global $db;
global $view;
@ -40,7 +40,7 @@ function exec_ogp_module() {
print_failure( get_lang("xml_steam_error") );
return;
}
$remote = new OGPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'], $home_info['timeout']);
$remote = new GSPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'], $home_info['timeout']);
$host_stat = $remote->status_chk();
if( $host_stat === 0 )
{
@ -50,14 +50,14 @@ function exec_ogp_module() {
}
else
{
if ( $remote->is_screen_running(OGP_SCREEN_TYPE_HOME,$home_id) == 1 )
if ( $remote->is_screen_running(GSP_SCREEN_TYPE_HOME,$home_id) == 1 )
{
print_failure( get_lang("server_running_cant_update") );
return;
}
$log_txt = '';
$update_active = $remote->get_log(OGP_SCREEN_TYPE_UPDATE,
$update_active = $remote->get_log(GSP_SCREEN_TYPE_UPDATE,
// Note exec location should not be added here as the log is in root where steam is executed.
$home_id,clean_path($home_info['home_path']),
$log_txt);

View file

@ -22,7 +22,7 @@ function do_progress($kbytes,$totalsize)
require_once("includes/lib_remote.php");
require_once("modules/config_games/server_config_parser.php");
function exec_ogp_module() {
function exec_gsp_module() {
global $db, $view;
@ -53,7 +53,7 @@ function exec_ogp_module() {
if ( !empty($state) )
{
$server_xml = read_server_config(SERVER_CONFIG_LOCATION."/".$home_info['home_cfg_file']);
$remote = new OGPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
$remote = new GSPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
if ( $state == "start" )
{
$postinstall = $server_xml->post_install ? $server_xml->post_install : "";

View file

@ -118,7 +118,7 @@ function smart_resize_image($file,
return true;
}
function exec_ogp_module() {
function exec_gsp_module() {
global $db;

View file

@ -6,7 +6,7 @@
require_once('home_handling_functions.php');
require_once("modules/config_games/server_config_parser.php");
function exec_ogp_module()
function exec_gsp_module()
{
global $db;
global $view;
@ -46,20 +46,20 @@ function exec_ogp_module()
}
require_once('includes/lib_remote.php');
$remote = new OGPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
$remote = new GSPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'],$home_info['timeout']);
$home_log = "";
if( isset( $server_xml->console_log ) )
{
$log_retval = $remote->get_log(OGP_SCREEN_TYPE_HOME,
$log_retval = $remote->get_log(GSP_SCREEN_TYPE_HOME,
$home_info['home_id'],
clean_path($home_info['home_path']),
$home_log, 100, (string) $server_xml->console_log);
}
else
{
$log_retval = $remote->get_log(OGP_SCREEN_TYPE_HOME,
$log_retval = $remote->get_log(GSP_SCREEN_TYPE_HOME,
$home_info['home_id'],
clean_path($home_info['home_path']."/".$server_xml->exe_location),
$home_log);