mob/admin/verb
ban(mob/M as mob in world)
set category = "GM"
set desc="(player) Ban a player"
if (alert(src,"Do you really want to ban [M]?","Really ban?","Ban","Cancel")=="Ban")
var/Z=input("Reason for banning. Fill this out or you can get in trouble for GM abuse.") as text
file("log.txt") << "[usr] has banned [M] for [Z]"
var/N=ckey(M.key)+" "+M.client.address
file("banlist.txt") << "[N]"
M.Saver()
del(M)
unban(key as text)
set category = "GM"
var/banlist=file2text("banlist.txt")
var/p = findtext(key,banlist)
if(p)
banlist = copytext(banlist,1,p) + copytext(banlist,p+length(banlist))
file("banlist.txt") << "[banlist]"
set desc="(key) Unban the specified key"
file("log.txt") << "[usr] has unbanned [key]"
Problem description:
Ban is working fine. Unban isn't though. I can manually unban them but that is hard if I'm AFK for my GMs to do. I'm trying to write my own ban system that can be editted easily. I hope someone can figure out why unban won't delete their entry from banlist.txt...
Ask if you need help with this.
-Angel 0=)