You can create your own favorites, by right clicking in the treeview window (right pane).
This will pop-up a menu, either you add a new filter or you can edit a exsisting filter.
The editor is simple and the filter syntax is pretty much the same as ASE. What you don't have to do is to write line numbers, GS takes cares of that for you.
There is simple "Test filter" button, which will give some help if the filter is valid or not but it is not 100% fool proof.
Save if you want keep the changes otherwise cancel.
Syntax:
- Code: Select all
Command var1 Operator var2 Command2
Command can be if, keep, remove or goto.
var1 can be a constant*, server variable or a string.
var2 can be a constant*, server variable or a string.
If a string then it must be inside quotes ("), requires for numbers values also.
* See below for constants.
eg:
- Code: Select all
if hostname == "*hardcore*" keep
or
- Code: Select all
if players >= "5" keep
- Code: Select all
if players > maxplayers remove
etc
Constants:
- hostname
anticheat
game
ping
country
ip
port
address
map
players
maxplayers
modname
favorite,
version
private
if statement
if statement command is used to compare to values.
Syntax:
- Code: Select all
if var1 OP var2 command
OP can be any operator code see below for a full list.
command will occur when if statement is TRUE.
Example of if statement:
- Code: Select all
if modname != "cpma" remove
Operator codes (for comparing in if statements):
- Code: Select all
== : strings match (case sensitive)
!= : strings don't match (case sensitive)
~== : strings match (case insensitive)
~!= : strings don't match (case insensitive)
< : less than
<= : less than or equal
> : greater than
>= : greater than or equal
for strings wildcard can be used:
* = match any string
? = match any character
Example with wildcard compares:
- Code: Select all
if version == "Quake 4 Final V1.4*" remove
The above filter will remove any version containing "Quake 4 Final V1.4" in the version string.
Additional notes:
If no condition is met then default is to keep the server in the list.
Group filters
You can create group filters, a group filter can be used for ON / OFF typical filters. Which means either you want to see servers with specific setting or hide by simply clicking one of the either filters.
To understand more how they work look at (use edit) the Punbuster On/Off filter or Private hide or show, a third example is the Global ping filter.
How to create such filter ensure to have a common Group name which can be set in top right field in the editor and ensure the check box at bottom of the editor is checked.
Want more to read about the filters, the following topic could be interested Filters, Group filters and Global filters explained
