The library is called serverquery (It needs lua sockets to work, threading is your own dilemma and personal choice, I dont know if there's a module for lua sockets to support threading, this code isn't supportive of it)
[url]http://luabin.foszor.com/2246[/url]
Functions that work:
[lua]
serverquery.GetMasterServerList(stringGameName,strParameters [, numTimeoutInSeconds]) --Example ('garrysmod',"\\napp\\500\\0"), returns a table of servers, each server being {<ip>,<port>}
serverquery.GetLatency(stringIPAddress [, numberPort [, numTimeoutInSeconds ] ]) --Returns millisecond latency
serverquery.GetServerInfo(stringIPAddress [, numberPort [, numTimeoutInSeconds ] ]) --Returns string hostname
[/lua]
[b]Functions that don't work because I am having difficulties with the challenge number and how to use it in the context of RULES query and other queries requiring challenge numbers.[/b]
[lua]
serverquery.GetServerRules(stringIPAddress [, numberPort [, numTimeoutInSeconds ] ])
serverquery.GetChallengeNumber(stringIPAddress [, numberPort [, numTimeoutInSeconds ] ]) --dont know where the 4 byte challenge number is, or it keeps fucking up with my code to extract it...
[/lua]
If anybody has suggestions on how to fix my failure in the challenge number usage please post something that could help or point out the problem.
I have already thoroughly looked at both of valve's documentation pages:
[url]http://developer.valvesoftware.com/wiki/Master_Server_Query_Protocol[/url]
[url]http://developer.valvesoftware.com/wiki/Server_Queries[/url]
Very nice. This will surely be useful for a lot of people.
Thanks.
[QUOTE=maurits150;20214826]Very nice. This will surely be useful for a lot of people.
Thanks.[/QUOTE]
Fuck.....
I didn't know steam condenser had a lua api:
[url]http://github.com/TheLinx/steam-condenser/blob/master/lua/steam/init.lua[/url]
-.-
Sorry, you need to Log In to post a reply to this thread.