From 9e143992626de0cb5dc84a47de369a0f40a0976c Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sat, 6 Sep 2025 10:41:02 +0000
Subject: [PATCH 1/2] Initial plan
From b8cac44bff4395b722a4ad1e396333c42584cb10 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sat, 6 Sep 2025 10:47:00 +0000
Subject: [PATCH 2/2] Add XML Config FAQ section for admin users only
Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
---
modules/faq/faq.php | 13 ++
modules/faq/faq.rss | 460 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 473 insertions(+)
diff --git a/modules/faq/faq.php b/modules/faq/faq.php
index 9fffda50..9ef1be46 100644
--- a/modules/faq/faq.php
+++ b/modules/faq/faq.php
@@ -120,10 +120,23 @@ function exec_ogp_module()
}
+ // Check if user is admin
+ global $db;
+ $isAdmin = false;
+ if(isset($_SESSION['user_id']) && $db && $db instanceof OGPDatabase) {
+ $isAdmin = $db->isAdmin($_SESSION['user_id']);
+ }
+
$entries = array();
foreach($items as $index => $item)
{
$category = $item['category'][0];
+
+ // Only show XML Config category to admin users
+ if($category === 'XML Config' && !$isAdmin) {
+ continue;
+ }
+
$entries[$category][$index]['title'] = $item['title'][0];
$entries[$category][$index]['content'] = $item['content:encoded'][0];
}
diff --git a/modules/faq/faq.rss b/modules/faq/faq.rss
index 80de111b..98941ef9 100644
--- a/modules/faq/faq.rss
+++ b/modules/faq/faq.rss
@@ -185,6 +185,466 @@ As always, if you need help just ask on Discord.
+-
+ game_key
+ XML Config
+
+ The unique identifier for the game. This key is used internally by the system to identify the game type.
+
+ Usage: <game_key>unique_game_identifier</game_key>
+
+ Example: <game_key>counter_strike_source</game_key>
+
+
+
+-
+ protocol
+ XML Config
+
+ Specifies the network protocol used by the game server for communication.
+
+ Usage: <protocol>protocol_name</protocol>
+
+ Example: <protocol>valve</protocol>
+
+
+
+-
+ lgsl_query_name
+ XML Config
+
+ The query name used by LGSL (Live Game Server List) to identify and query the server status.
+
+ Usage: <lgsl_query_name>query_name</lgsl_query_name>
+
+ Example: <lgsl_query_name>cs16</lgsl_query_name>
+
+
+
+-
+ gameq_query_name
+ XML Config
+
+ The query name used by GameQ library to query server information and player details.
+
+ Usage: <gameq_query_name>query_name</gameq_query_name>
+
+ Example: <gameq_query_name>source</gameq_query_name>
+
+
+
+-
+ installer
+ XML Config
+
+ Specifies the installation method for the game server (e.g., steamcmd, manual, etc.).
+
+ Usage: <installer>installer_type</installer>
+
+ Example: <installer>steamcmd</installer>
+
+
+
+-
+ game_name
+ XML Config
+
+ The human-readable display name of the game shown in the panel interface.
+
+ Usage: <game_name>Display Name</game_name>
+
+ Example: <game_name>Counter-Strike: Source</game_name>
+
+
+
+-
+ server_exec_name
+ XML Config
+
+ The name of the server executable file that will be started to run the game server.
+
+ Usage: <server_exec_name>executable_name</server_exec_name>
+
+ Example: <server_exec_name>srcds_linux</server_exec_name>
+
+
+
+-
+ query_port
+ XML Config
+
+ Defines the query port offset from the main server port. The 'type' attribute can be 'add' or 'subtract'.
+
+ Usage: <query_port type="add">offset_value</query_port>
+
+ Example: <query_port type="add">1</query_port>
+
+
+
+-
+ cli_template
+ XML Config
+
+ Template string that defines the order and structure of command line parameters when starting the server.
+
+ Usage: <cli_template>%PARAM1% %PARAM2% %PARAM3%</cli_template>
+
+ Example: <cli_template>%IP% %PORT% %PLAYERS% %MAP%</cli_template>
+
+
+
+-
+ cli_params
+ XML Config
+
+ Container element that holds individual command line parameter definitions (cli_param elements).
+
+ Usage:
+ <cli_params>
+ <cli_param id="PORT" cli_string="-port" options="s" />
+ </cli_params>
+
+ Available parameter IDs: GAME_TYPE, HOSTNAME, IP, MAP, PID_FILE, PLAYERS, PORT, QUERY_PORT, BASE_PATH, HOME_PATH, SAVE_PATH, OUTPUT_PATH, USER_PATH, CONTROL_PASSWORD
+
+
+
+-
+ reserve_ports
+ XML Config
+
+ Container for additional ports that need to be reserved/allocated for the server (beyond the main port).
+
+ Usage:
+ <reserve_ports>
+ <port type="add" id="RCON_PORT" cli_string="+rcon_port">1</port>
+ </reserve_ports>
+
+ The 'type' attribute can be 'add' or 'subtract' to calculate offset from main port.
+
+
+
+-
+ cli_allow_chars
+ XML Config
+
+ Regular expression pattern that defines which characters are allowed in command line parameters.
+
+ Usage: <cli_allow_chars>regex_pattern</cli_allow_chars>
+
+ Example: <cli_allow_chars>[a-zA-Z0-9._-]</cli_allow_chars>
+
+
+
+-
+ maps_location
+ XML Config
+
+ Relative path from the server root directory where map files are located.
+
+ Usage: <maps_location>path/to/maps/</maps_location>
+
+ Example: <maps_location>cstrike/maps/</maps_location>
+
+
+
+-
+ map_list
+ XML Config
+
+ Path to the file that contains the list of available maps for the server.
+
+ Usage: <map_list>path/to/maplist.txt</map_list>
+
+ Example: <map_list>cstrike/mapcycle.txt</map_list>
+
+
+
+-
+ console_log
+ XML Config
+
+ Path to the server console log file for monitoring server output and errors.
+
+ Usage: <console_log>path/to/log/file</console_log>
+
+ Example: <console_log>logs/console.log</console_log>
+
+
+
+-
+ exe_location
+ XML Config
+
+ Relative path from server root to the directory containing the server executable.
+
+ Usage: <exe_location>path/to/executable/</exe_location>
+
+ Example: <exe_location>bin/</exe_location>
+
+
+
+-
+ max_user_amount
+ XML Config
+
+ Maximum number of players/users that can connect to the server simultaneously.
+
+ Usage: <max_user_amount>number</max_user_amount>
+
+ Example: <max_user_amount>32</max_user_amount>
+
+
+
+-
+ control_protocol
+ XML Config
+
+ Protocol used for remote server control and administration commands.
+
+ Available values: rcon (HL, Q1/2/3), rcon2 (HL2/Source), lcon (legacy console), armabe (Arma 2 BattlEye)
+
+ Usage: <control_protocol>protocol_type</control_protocol>
+
+ Example: <control_protocol>rcon2</control_protocol>
+
+
+
+-
+ control_protocol_type
+ XML Config
+
+ Sub-type specification for the control protocol version.
+
+ Available values: new (Half-Life 1.1.0.6 or newer), old (Quake 1/2/3 or old Half-Life)
+
+ Usage: <control_protocol_type>protocol_version</control_protocol_type>
+
+ Example: <control_protocol_type>new</control_protocol_type>
+
+
+
+-
+ mods
+ XML Config
+
+ Container element for game modifications/variants. Each server must have at least one mod.
+
+ Usage:
+ <mods>
+ <mod key="default">
+ <name>Default</name>
+ <installer_name>app_id</installer_name>
+ <installer_login>anonymous</installer_login>
+ </mod>
+ </mods>
+
+ Sub-elements: name, installer_name, installer_login, betaname, betapwd, steam_bitness
+
+
+
+-
+ replace_texts
+ XML Config
+
+ Container for text replacement rules in configuration files. Used to dynamically update config files with server-specific values.
+
+ Usage:
+ <replace_texts>
+ <text key="hostname">
+ <var>%HOSTNAME%</var>
+ <filepath>server.cfg</filepath>
+ </text>
+ </replace_texts>
+
+ Sub-elements: var, filepath, options, occurrence, default
+
+
+
+-
+ server_params
+ XML Config
+
+ Container for server configuration parameters that users can modify through the panel interface.
+
+ Usage:
+ <server_params>
+ <param key="-maxplayers" type="text">
+ <caption>Max Players</caption>
+ <desc>Maximum number of players</desc>
+ <default>16</default>
+ </param>
+ </server_params>
+
+ Parameter types: text, select, checkbox, checkbox_key_value
+
+
+
+-
+ custom_fields
+ XML Config
+
+ Container for custom configuration fields that modify server configuration files directly.
+
+ Usage:
+ <custom_fields>
+ <field key="sv_gravity" type="text">
+ <var>sv_gravity</var>
+ <filepath>server.cfg</filepath>
+ <default_value>800</default_value>
+ <desc>Server gravity setting</desc>
+ </field>
+ </custom_fields>
+
+ Sub-elements: var, filepath, default_value, desc, options, occurrence, access
+
+
+
+-
+ list_players_command
+ XML Config
+
+ Server console command used to retrieve the list of currently connected players.
+
+ Usage: <list_players_command>console_command</list_players_command>
+
+ Example: <list_players_command>status</list_players_command>
+
+
+
+-
+ player_info_regex
+ XML Config
+
+ Regular expression pattern used to parse player information from the server console output.
+
+ Usage: <player_info_regex>regex_pattern</player_info_regex>
+
+ Example: <player_info_regex>#\s*(\d+)\s+"(.*)"\s+(\S+)\s+(\d+)\s+(\d+)\s+(\S+)</player_info_regex>
+
+
+
+-
+ player_info
+ XML Config
+
+ Container that defines how to parse individual player information fields from console output.
+
+ Usage:
+ <player_info>
+ <index key="player_id">1</index>
+ <index key="player_name">2</index>
+ <index key="player_steamid">3</index>
+ </player_info>
+
+ Each index corresponds to a capture group in the player_info_regex.
+
+
+
+-
+ player_commands
+ XML Config
+
+ Container for commands that can be executed on individual players (kick, ban, etc.).
+
+ Usage:
+ <player_commands>
+ <command key="kick" type="text">
+ <string>kick %PLAYER_ID%</string>
+ </command>
+ </player_commands>
+
+ Sub-elements: string, default, option
+
+
+
+-
+ pre_install
+ XML Config
+
+ Command or script to execute before the game server installation process begins.
+
+ Usage: <pre_install>command_or_script</pre_install>
+
+ Example: <pre_install>mkdir -p logs</pre_install>
+
+
+
+-
+ post_install
+ XML Config
+
+ Command or script to execute after the game server installation process completes.
+
+ Usage: <post_install>command_or_script</post_install>
+
+ Example: <post_install>chmod +x server_binary</post_install>
+
+
+
+-
+ pre_start
+ XML Config
+
+ Command or script to execute before starting the game server process.
+
+ Usage: <pre_start>command_or_script</pre_start>
+
+ Example: <pre_start>echo "Starting server..." > logs/startup.log</pre_start>
+
+
+
+-
+ post_start
+ XML Config
+
+ Command or script to execute after the game server process has started.
+
+ Usage: <post_start>command_or_script</post_start>
+
+ Example: <post_start>echo "Server started successfully" > logs/startup.log</post_start>
+
+
+
+-
+ environment_variables
+ XML Config
+
+ Environment variables to set before starting the server process, separated by semicolons.
+
+ Usage: <environment_variables>VAR1=value1;VAR2=value2</environment_variables>
+
+ Example: <environment_variables>LD_LIBRARY_PATH=./lib;MALLOC_CHECK_=0</environment_variables>
+
+
+
+-
+ lock_files
+ XML Config
+
+ List of files that should be protected from user modification, separated by semicolons.
+
+ Usage: <lock_files>file1;file2;file3</lock_files>
+
+ Example: <lock_files>server_binary;startup_script.sh;critical_config.cfg</lock_files>
+
+
+
+-
+ configuration_files
+ XML Config
+
+ Container for configuration files that can be edited through the panel's configuration editor.
+
+ Usage:
+ <configuration_files>
+ <file description="Server Configuration">server.cfg</file>
+ <file description="Map Cycle" options="maps">mapcycle.txt</file>
+ </configuration_files>
+
+ Attributes: description (display name), options (special handling)
+
+
+