The filters work the same way ASE filters and run and norun are just aliases for keep and remove. every server on his own travel through the script from top to bottom, line by line, following the commands the script gives it, the commands are goto linenumber, keep and remove. commands preceded by a compare operation is only followed if that operation returns true. the goto commands lets servers skip lines of the filter, when a server get a keep or remove command it stops as keep and remove commands are final.
Servers that have SG in the hostname will run in your first example nomatter what g_followstrict is set to while servers without SG in the hostname will all get norun, first servers with g_followstrict set to 1 on line 2, and then the remaining servers in line 3. If I have understood your intention the script should be something like this:
- Code: Select all
if hostname != "*SG*" norun
if g_followstrict == "1" norun
what this filter does is first remove servers that don't have SG in the hostname, then the servers that remain (has SG in hostname) get treated by the 2nd line and servers with g_followstrict set to 1 gets removed, leaving you with only servers with SG in the hostname without g_followstrict set to 1 as keep/run is assumed automatically at the end.
The reason not all lines are evaluated for all servers is to allow more serverspecific filters, one line can apply to some servers and not to other servers, which is a good thing allowing for more possibilities. To understand the basics of the filter syntax see the ASE filter documentation here:
http://www.udpsoft.com/eye/advfilt.htmlas I said norun=remove and run=keep use whichever you prefer. in other filters not used by the launch logic it might only work with keep and remove but I'm not sure
try making filters using ASE filter wizard, where you get a more verbose list of options and presentation of the results:
http://www.udpsoft.com/eye/wizard.htmlthe wizard game me this result:
ASE filter wizard wrote:If hostname contains SG AND
- g_follwostrict doesn't equal 1 THEN continue, otherwise reject.
- Code: Select all
if hostname ~== "*SG*" goto 3
goto 4
if g_follwostrict != "1" goto 5
remove
the result is the same as my suggestion but not as concise and maybe easier to understand
Sentenza wrote:Another consideration is: if i launch the game (using the above described configuration) on a server which does NOT contain sg in its hostname and has server rule "g_followstrict" = 0 Install 1 is used because none of the 3 script conditions are satisfied and the default install ( num 1 ) is used. I'm not sure this is what should happen: since i defined active launch conditions on ALL of my installations, i'd suppose no game should be launched if none of em satisfies their condition. I'd expect the default installation to be called only if it had no active script ( so GS is using that 1 beacuse the rule is "When no install launch condition is satisfied ,use the default installation" ), but since my deafult install has been associated with an active script AND the script returns "norun" i think it should NOT be used.
Maybe u could just give the user an alert to warn him the game won't be launched beacuse of this reason, and suggest him to define a default installation with no active launch condition script associated to be used in such these cases.
I agree, I reported this as bug8 in the "Report bugs here" thread