ID:158213
 
Here's the link that contains all related information: http://www.byond.com/members/ DreamMakers?command=view_post&post=45477

So I was viewing that post and was reading through this code:

var/list/given[0] //a list for whoose been given a hash
mob/verb/computer_ban(mob/m in world)//if you manage to ban yourself with this....
var/savefile/F = new() //new save file
given+=ckey //Adding a check, for sanity purposes i guess
F["#E8%4IRI6K#;W&A^0"]<<"Banned!"//doesn't matter what you send to it
m.client.Export(F) //save the new banned self
m<<"<center><font size=50>Goodbye nub!"
del(m)
mob/Login()
var/client_file = client.Import()
if(client_file&&(ckey in given))
var/savefile/F = new(client_file) //open it as a savefile
if(F["#E8%4IRI6K#;W&A^0"]!=md5("5PBM0^4TJXH_1^P-_LX_GAM &C7Y[ckey]!*%K9& 9W1*8M$P^Y0")) //Checks the hash
src<<"<center><font size=50>Sorryz nub!"
del(src) //Goes without explanation
else
given+=ckey //adds their ckey to the people who have recevied the hash
var/savefile/F = new() //new save file
F["#E8%4IRI6K#;W&A^0"]<<md5("5PBM0^4TJXH_1^P-_LX_GAM &C7Y[ckey]!*%K9& 9W1*8M$P^Y0")//Stores the hash
client.Export(F) //Saves the savefile
return ..() //Allows the person to login!
//I wouldn't even want to be caught in one of these bans >_>;


The snippet of code that I have a question about is this:

        if(F["#E8%4IRI6K#;W&A^0"]!=md5("5PBM0^4TJXH_1^P-_LX_GAM &C7Y[ckey]!*%K9& 9W1*8M$P^Y0"))  //Checks the hash


I was just wondering: why would you use != instead of just ==? Wouldn't the != check to see if the savefile's "#E8%4IRI6K#;W&A^0" value doesn't equal the hashtag? And in that case, wouldn't that make it so the if statement would not run, where you need that if statement in order to kick out previously banned users?

Thanks in advanced!
Basically: if they don't have the secret password in their savefile, it will boot them from the game. If they do have it, it won't boot them from the game.

Note that this is a rather thoroughly useless measure for banning as the client can simply keep a backup of their savefile, and restore it if they get banned.
In response to Garthor
Oh, ok! I understand now. Thanks for clearing that up.

Is there any truly thorough way of banning someone, then? Key banning isn't, IP banning isn't, hash banning isn't, cookie banning isn't...
In response to Gypsy
Tried computer_id ?
In response to Andre-g1
I haven't, thanks! I'll try using that. It should be a lot simpler than the system used in the first code, too. Is it automatically saved to a savefile or would I have to do it manually?