ID:268200
 
I have code so noone can add Admin, GM, etc. to their name, and every name I type in, it says you can add [GM] in my name, even though I don't have it in my name!

Heres the code:
var/list/illegal_names = list("\[Admin]","\[Designer]","\[Owner]","\[Host]","\[GM]","\[Admin GM]","\[Master GM]","\[Master Admin]")

mob
proc
CreateCharacter()
var/default_value = key
var/charactername = input("What would you like to name your character?","Name",default_value) as null|text


if(findtext(charactername,illegal_names.Find(charactername)))
alert("Nope, don't fake!","FAKER!")
del(src)


Thanks!

Non-PC
for(var/item in illegal_names)
if(findtext(charname,item)
src<<"FAKER!!!11!"
del src
In response to Airjoe
Airjoe wrote:
for(var/item in illegal_names)
if(findtext(charname,item)
src<<"FAKER!!!11!"
del src

:)

Thanks man!

Non-PC