Server setting variables

Post Reply
Masher
Site Admin
Posts: 3180
Joined: Thu Apr 20, 2006 2:54 pm
Location: Ohio
Contact:

Server setting variables

Post by Masher » Sun Sep 16, 2012 10:37 am

All server settings with a '+' after the setting name can use variables. Variables that are currently available are:

Variable identifiers (ie %Var4%) are case sensitive.

%Root% = Replaced with the associated server's root path setting
%ServerWD% = Replaced with the associated server's working directory setting
%DATE% = Replaced with current date
%TIME% = Replaced with current time
%IP% = Replaced with server's query ip setting
%Port% = Replaced with server's game port setting
%RconPort% = Replaced with server's rcon port setting
%QryPort% = Replaced with server's Query Port setting
%QryPort2% = Replaced with server's Query Port 2 setting
%ServerID% = The server's ID
%OwnerID% = The ID of the server's owner
%SDefID% = The ID of the server's server definition (remote monitor)
%SDef% = The textual name of the server's server definition (remote monitor)
%Var1% = Custom Variable 1 (Var1-12 are user definable per server and can be set to be editable by users. See section below for details.)
%Var2% = Custom Variable 2
%Var3% = Custom Variable 3
%Var4% = Custom Variable 4
%Var5% = Custom Variable 5
%Var6% = Custom Variable 6
%Var7% = Custom Variable 6 (Custom variables 7-12 available in versions 1.78+)
%Var8% = Custom Variable 6
%Var9% = Custom Variable 6
%Var10% = Custom Variable 6
%Var11% = Custom Variable 6
%Var12% = Custom Variable 6
%DependsID% = ID of the server the server depends on (Added in 1.862)
%Depends * % = Replaced with the variable of the server the server depends on (Added in 1.862 - See section below for details)
%SteamCMD% = Replaced with steamcmd; useful for update tool. Panel and monitor will download steamcmd the first time the variable is encountered. (Added in 1.88)

Variables usable only in web interface
%UserName% = Displays the logged in user's username
%PassWord% = Password for currently logged in user

Dependency Server Variables
Version 1.862 now allows servers that are dependencies of other servers to use variables from the server it depends on. Use the variable %Depends * % and replace '*' with the variable you want to use. For example if you want to get the %IP% variable you'd use %DependsIP%, to get the game port you can use %DependsPort%, etc. All variables will work with this method if the server depends on another server.

Public Variables
With version 1.58+ you can mark all Custom Variables as public variables. This will allow these variables to be editable by the server owner from a special page accessible from the Server Management page, via a link labeled "Srvr Vars". The page will display the variable description and a text box that contains the current setting for the variable and allow the user to change the values. Sub-user and group members with the edit command line permissions will be allowed to view/edit the values as well.

When using public variables as commandline options, be sure to quote them in the command line. This will prevent users from setting additional switches via this feature. For example, let's say you want to allow users to use their own username/password for the steamcmd update system. You make custom var 5 and 6 the steamcmd username and password. The update commandline should look something like:

+login "%Var5%" "%Var6%" +force_install_dir ../csgo_ds +app_update 740 validate
Masher
-----------
Please do not PM me unless asked to! We are a small company and if you have an issue or question it would be best to post it in the forums where it can help others in the future.

Need an affordable web control panel? Try UGCC.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest