ID:158725
 
Okay if possible I would like to keep name-calling/flaming dowm today. Please, only helpful comments.

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.
Look up hub_password.
Well for starters you could change the hub password.
If your giving out your source there's no way to code it in the source to allow only certain people in after all they could just remove it
In response to Vic Rattlehead (#1)
Can't use the hub password. The game is under my friends key and his computer has a virus so he wont be on for a while and I have no way to get in contact with him. So that idea won't work.
In response to SadoSoldier (#3)
SadoSoldier wrote:
Can't use the hub password. The game is under my friends key and his computer has a virus so he wont be on for a while and I have no way to get in contact with him. So that idea won't work.
I guess deal with it for now, you leaked out your source (it wasn't stolen, that doesn't happen on BYOND >_>) and if you can't mess with the hub_password, then there's nothing you can do.
In response to Vic Rattlehead (#4)
Try emailing the guy and tell him to give you his password.Or just make a new hub.
In response to Vic Rattlehead (#4)
Its possible, and even though some people on this forum are pricks... They are smart and I'm sure they can help me as long as this stays up until they look at it, until then I'm going to continue researching and trying.
SadoSoldier wrote:
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.

Uh, no, naturally it's not possible to arbitrarily just 'kill' servers. Otherwise, everybody could shut down any server they want... You could only do this if you had implemented a method of shutting down the server remotely in the old version. (Though if the source was leaked, then that method could just be removed by a smart user)
In response to SadoSoldier (#6)
What you want is theoretically possible, but you'd get banned from BYOND from it, on account of it being a malicious attack against somebody else's computer. "Hacking", if you will.
In response to Kaioken (#7)
Garthor says otherwise >.>
In response to Garthor (#8)
Its considered hacking to close out a server thats being hosted on a hub that isnt the hosters? Ah well, if I get banned I get banned. But could you at least tell me how to search the hub for online servers and report back to one server the hosters ip or names or something.
In response to SadoSoldier (#10)
If the version of the game you're trying to mess with doesn't have systems in place to allow you do that, you can't do it. Any other attempt to gain access to someone's computer to try and 'shut them down' is against the law. So your best bet is waiting on your friend to change the hub_password.

This won't stop them from hosting but it'll prevent their servers from appearing on the hub entry. There's nothing you can do that will outright prevent them from hosting; they already have the files.
In response to SadoSoldier (#9)
Obviously, I was being practical and disregarded options that would be out of question, such as malicious attacks. =P
And uh, trying such a thing isn't such a good idea. It won't even necessarily be feasible/effective at all as far as you're concerned, for that matter.