Server Query Doesn't Return Password Status



  • When using a PHP or other server query script the only option that works is to set the server as HalfLife 2/Source compatible. This works well except that the password status is always returned as false. This affects our GSP as our automation scripts can’t determine if a server has a password set or not. Is this something that can be fixed? I’d really appreciate a reply on this either way.



  • I’m not sure how your script works… but you can try manually sending off UDP query packets to the server and manually parse out the reply. The in-game server browser can see password protected servers so obviously something in the reply packets says whether or not that it is password protected.

    This is a bad example as it’s not currently password protected in the Launch.log file, but pretend that it is.

    From launch.log:

    [0047.63] DevOnline: bPassword: 0, bSecure: 1, LastPlayed: 0, Version: 1001, ServerName: Vanquish - Duel Server, GameTags: AOCTeamObjective
    

    From the captured packets (I believe this is the right packet, it might not be :? ):

    0000   ff ff ff ff 49 11 56 61 6e 71 75 69 73 68 20 2d  ....I.Vanquish -
    0010   20 44 75 65 6c 20 53 65 72 76 65 72 00 61 6f 63   Duel Server.aoc
    0020   74 6f 2d 68 69 6c 6c 73 69 64 65 5f 70 00 63 68  to-hillside_p.ch
    0030   69 76 61 6c 72 79 6d 65 64 69 65 76 61 6c 77 61  ivalrymedievalwa
    0040   72 66 61 72 65 00 43 68 69 76 61 6c 72 79 3a 20  rfare.Chivalry: 
    0050   4d 65 64 69 65 76 61 6c 20 57 61 72 66 61 72 65  Medieval Warfare
    0060   00 00 00 00 0c 00 64 77 00 01 31 2e 30 2e 30 2e  ......dw..1.0.0.
    0070   31 00 b1 70 17 00 b4 76 c2 64 0c 40 01 41 4f 43  1..p...v.d.@.AOC
    0080   54 65 61 6d 4f 62 6a 65 63 74 69 76 65 00 f8 59  TeamObjective..Y
    0090   03 00 00 00 00 00                                ......
    


  • I don’t have any coding experience outside of some basic PHP so the packet example may as well be an alien language to me. I’m surprised this hasn’t been an issue for anyone else, especially other GSPs. If anyone knows how to get the TCAdmin v1 server query to return a password status I would be eternally grateful as that’s the most important thing. Our PHP status scripts can wait and I may be able to work that out myself. I’ll have to return to this as soon as I get some extra time.



  • Well if you ever get bored… pull up Wireshark and match the packet to that line from the Launch.log. Grab the packet with bPassword set to 1 and set to 0 and see the difference in the packets to find the magic byte that determines whether or not a password is set. Then when you query servers, shoot them the UDP packet to query it’s status and parse out that one byte on the return message.