Server rules

From HLSW Wiki

Jump to: navigation, search


Contents

Server Rules-Window

In this window, all server values are shown, which are defined at the actual selected server.

League Rules

Beside the server values you can compare the settings with big leagues. Red shown values differ from the league, yellow shown means, that this league uses a different value for it but its no needed exactly.

By right clicking on a value, you change it (change Value, even double clicking is possible), copy the value(+name) (copy) or change to the complete servervalues for a League (change to league rules).

League Rules editing

At the HLSW-Folder Subfolder Rules the different League-rules are saved as .cfg-files.
You can delete, edit the server rules or set up new.

The way a .cfg file works should be explained in the following example:

Filename: ESPL.cstrike.cfg

// URL: http://www.espl-europe.net
// Rules URL: http://www.espl-europe.net/ger/hl/cs/Ladder/rules?data[action]=league
// Date: Aug 9 2001


mp_timelimit 20 FALSE
mp_footsteps 1 TRUE


In the file name, the League name and the belonging Half-Life Mod has to be declared (the example shows ESPL as League name and Counterstrike the belonging mod). The rows with // at the beginning are only commentary lines, and not really necessary. There can be written additional information ( like the leagues/rules URL and the date of the latest update to the rules). In the following lines the CVar's are saved. Any line contains three data: the CVar (e.g. mp_timelimit), the value of the league (e.g. 20), and, if its necessary or optional (TRUE=optional, FALSE=obligatory).

for HL2 mods the filename should look like "<rulename>.Modname.HL2.cfg"

Server Rules

NGL-ONE.cstrike.cfg

Game Special Features

Parsing of the sv_contact rule

On games that are using the Half-Life Protocol or Half-Life 2 Protocol a server administrator can modify the rules displayed in HLSW by modifying the sv_contact rule. Each sub-string in sv_contact matching the format {<KEY>=<VALUE>} results in adding the rule <KEY> = <VALUE> to the rules table.

For example if sv_contact is set to

sv_contact "{hlsw_url=www.hlsw.org}"

an additional rule with key "hlsw_url" and value "www.hlsw.org" is added to the rules table.

The key is limited to alphanumerical characters (a ... z, A ... Z, 0 ... 9) and _. The value supports the escape character \. So it is possible to express the character { by \{ and \ by \\. It is possible to express more than one rule in sv_contact. If there exists already a rule of the same key the old rule is overwritten by the new one.

Personal tools
In other languages