> This is exactly what I'm sending to the server:
>
> 31 00 00 00 00 00 5C 67 61 6D 65 64 69 72 5C 66 69 72 65 61 72 6D 73 00
>
> i.e.
>
> '1' '0' '0000' '\gamedir\firearms' '\0'
>
> or
> 'A2M_GET_SERVERS_BATCH2' 'region code zero' 'startIP = all zeros' 'filter
> string\0'
>
> I also tried with "startIP" set to all zeros plus 2 bytes for the port.

I would assume the details of the protocol would be in the HL2 SDK
reference, but since some people are anxious to convert over...

Alfred's e-mail had this...

WriteByte( A2M_GET_SERVERS_BATCH2 ); // character '1'
WriteByte( 2 );// write the region we want info on
WriteString( startIP ); // the first ip address we are interested in
WriteString(filterString); // a backslash delimited string for filtering of

The packet should be BYTE, BYTE, STRING (null terminated?), STRING (null
term?)

So you're request should be...

'1', 0, 0, "gamedir\firearms"

...or as hexidecimal bytes...

31 00 00 5C 67 61 6D 65 64 69 72 5C 66 69 72 65 61 72 6D 73 00

If you wanted to specify IP address 1.2.3.4 it would be...

31 00 31 2E 32 2E 33 2E 34 00 5C 67 61 6D 65 64
69 72 5C 66 69 72 65 61 72 6D 73 00

I don't know if the leading character (A2M_GET_SERVERS_BATCH2) is a ONE '1'
(ascii 0x31) or a lowercase L 'l' (ascii 0x6C) since they look the same in
courier font, but if you are getting any response at all from using a ONE
'1' then it's probably a '1' and if you are getting a response from using a
lowercase L, it's probably a lowercase L.  :)

Jeffrey "botman" Broome


_______________________________________________
hlds_apps mailing list
[EMAIL PROTECTED]
http://list.valvesoftware.com/mailman/listinfo/hlds_apps

Reply via email to