Add XML Config FAQ section for admin users only
Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
parent
9e14399262
commit
b8cac44bff
2 changed files with 473 additions and 0 deletions
|
|
@ -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];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -185,6 +185,466 @@ As always, if you need help just ask on Discord.
|
|||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>game_key</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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>
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>protocol</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
Specifies the network protocol used by the game server for communication.
|
||||
|
||||
Usage: <protocol>protocol_name</protocol>
|
||||
|
||||
Example: <protocol>valve</protocol>
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>lgsl_query_name</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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>
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>gameq_query_name</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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>
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>installer</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
Specifies the installation method for the game server (e.g., steamcmd, manual, etc.).
|
||||
|
||||
Usage: <installer>installer_type</installer>
|
||||
|
||||
Example: <installer>steamcmd</installer>
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>game_name</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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>
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>server_exec_name</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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>
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>query_port</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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>
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>cli_template</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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>
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>cli_params</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>reserve_ports</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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.
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>cli_allow_chars</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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>
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>maps_location</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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>
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>map_list</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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>
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>console_log</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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>
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>exe_location</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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>
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>max_user_amount</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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>
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>control_protocol</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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>
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>control_protocol_type</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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>
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>mods</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>replace_texts</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>server_params</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>custom_fields</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>list_players_command</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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>
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>player_info_regex</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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>
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>player_info</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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.
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>player_commands</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>pre_install</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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>
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>post_install</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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>
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>pre_start</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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>
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>post_start</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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>
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>environment_variables</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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>
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>lock_files</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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>
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>configuration_files</title>
|
||||
<category>XML Config</category>
|
||||
<content:encoded>
|
||||
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)
|
||||
</content:encoded>
|
||||
</item>
|
||||
|
||||
</channel>
|
||||
</rss>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue