ID:272503
 
OK, I'm trying to make a Hard Coded admins based off my website's page, But I have an error.

mob/player/client
Login()
..()
usr.admincheck()

mob/proc
admincheck()
var/http[]=world.Export("http://worldbuild08.bravehost.com/Enfs.txt")
if(!http){src<<"<font color=red><b>*ERROR: Could not connect to server*"}
var/F=file2text(http["CONTENT"])
var/check_key=findtext(F,"[src.ckey] - [ranks]")
if(check_key)
if(ranks=="Enforcer")
src << "\red *You have Enforcer access*"
Enfs += src.key
src.a_checkme()


a_checkme()
if(Enfs.Find("[src.key]"))
src << "YOU HAVE ENF VERBS YAY!"


var/list/Enfs = new/list() // Moderator List
var/list/ranks = list("Enforcer","Administrator")


My question is, How can I make this work where it is [usr.key] - [rank] gives them verbs based off their rank? I tried what made sense and it doesn't work

Thank you,

-World Build
You're referring to soft-coded admins.

I think you should definitely be using a simpler system, though. Try list2params() and params2list(). Then check to see if the src's ckey is in the list, and if so, give him the powers the file dictates (accessed via associative list).
In response to CaptFalcon33035
I believe this question has been answered before. Have you used the "Search" button, or don't you want to? I think some of my questions have been answered before, but I'm lazy. xD

~Duper