I need a way to make a code that goes to the hub checks all the servers and then reports back to the game and lists all the keys. The system I'm trying to figure out is how to make it so only a specific host can host the game, by using one source. The reason I need to do this, is because a few people have gained the old source and are hosting unofficial servers and I need a way to code it in the official source to make it basically kill the unofficial servers.
I'm almost positive this is possible. Thank you.
This might clear it up a little:
proc/check()
var/http[]=world.Export("http://www.byond.com/hub/SadoSoldier.PublicPager?tab=index")//testing it on my pager demo im working on so i turned it into a game for this
if(http&&http["CONTENT"])//checks to see if the hub exists
if(http["CONTENT-TYPE"]!="text/plain")//if it doesnt then
world<<"\red Game could not be found."//say it doesnt
else//if it does
var/savefile/F=new//this wont work for this but its just an example, define a new savefile called F
F.ImportText("/",file2text(http["CONTENT"]))//this wont work either, send the host info to F
world<<"\red Retrieving information..."//let the world know its retrieving the info
F.cd="/worlds"//change the cd to /worlds
for(var/Z in F.dir)//this is just used to specificy the correct cd
F.cd="[Z]"//stated above
if(F.host_key == "SadoSoldier")//this wont work, if the host key to the servers are SadoSoldier
world<<"\green [F] has been allowed"//allow them
..()//continue on with normal business
else//if it isnt
world<<"\red [F] has been deleted"//announce deletion
del(F)//delete it
Not much, but some.