You really can't use usr in that proc. When you call your proc, usr won't be anything close to what you think it'll be.
|
I actually use a version of this myself, although I use an xml file and Deadron's XML library to create an in-depth, remote config file.
|
Why would you keep checking? What's the point of your edit? Why did you use "usr" in a global procedure? Why would you change this is any way, seeing as how it was perfect the way it was? Hostcheck should return 1 or 0, and you could use that on OpenPort() to restrict an unauthorized world from opening to the public.
|
CaptFalcon33035 wrote:
Why would you keep checking? Hostcheck should return 1 or 0, and you could use that on OpenPort() to restrict an unauthorized world from opening to the public. You keep checking in case you decide that you don't want this person hosting anymore. It doesn't have to check every second (every 10 minutes would be fine, too). But if the host decides the rebel and ban you programmer or somesuch, the programmer can then edit the file and remove them as a host.. Then a few moments later, the game will detect that they're no longer allowed to host and close down the world. CheckAccess returns 1 or 0, not HostCheck. HostCheck is the looping procedure that checks if they're allowed to host or not. Using it in OpenPort would be good too. |
Just to point this out: you could use findtext() instead of all this list muck you're creating there. =P
|
DivineO'peanut wrote:
Just to point this out: you could use findtext() instead of all this list muck you're creating there. =P The list muck lets you do more than just check if you name is on the list if you want. :) |
That's true. A muck would allow you to do more, but not that muck. If I wanted to parse the text, I'd use a list to specify builtin actions in the text, and use findtext() to draw the needle of the key's parsing list. That, I believe, would prove more efficient in terms of performance, than using the fancy list proc to find all of the keys, when you need only the key you intend to parse.
That is, if by "more" you mean parsing in the access check proc. |
DivineO'peanut wrote:
That's true. A muck would allow you to do more, but not that muck. If I wanted to parse the text, I'd use a list to specify builtin actions in the text, and use findtext() to draw the needle of the key's parsing list. That, I believe, would prove more efficient in terms of performance, than using the fancy list proc to find all of the keys, when you need only the key you intend to parse. Give me a break. I did it in under 5 minutes and that proc was handy. If I was going to be that picky I'd make the whole textfile a set of params. |
Ha ha, yeah, I just felt like being an ass. :)
Anyway, this is highly random, let's get back to topic before this post gets locked! |
Couldn't you just as easily export a message to the server closing the ports? I mean, I really don't see any good reason to have it keep looping. :/
|
CaptFalcon33035 wrote:
Couldn't you just as easily export a message to the server closing the ports? I mean, I really don't see any good reason to have it keep looping. :/ Beats me, I've never done it. |
ShadowUser wrote:
No matter how useful or practical it is, a secret phrase of power that brings an entire BYOND world to it's knees is still pretty freakin' cool. Eta kuram na smekh! |
Well i have a Idea On how to make a good defense against a rebellion of a host (Yet i have no clue on how to code it )
The Game Checks if Yes it Carrys on if No it closes the Server and deletes it self stoping the Host from Hosting the Game 100% |
Jamesburrow wrote:
OK, Im a GM on a game that has close to 60 players at any one time. (and, miraculously, it is not a DBZ game, but an actually good game). What is this game? |
GhostAnime wrote:
From what I heard, it no longer works for 4.0; hosts have absolute power :( [however, I did not confirm this yet] Actually, testing this feature, a simple hack may allow support for IsBanned again: world/IsBanned(k,a) When pager-banning myself, I was able to login using this snippet. |
That's exactly what I do with my remote xml file (although my key is hard coded, just in case someone manages to tamper with the remote file). At a certain user level and above, they cannot be banned from the game.
|
A host should never be able to ban a creator. There are ways to bypass even pager bans.
There's a procedure that gets called when checking bans from the pager: Client There may be some errors in this snippet, as I haven't touched DM in about a year... =/ |
No more abuse life's good :)