mob
verb
Ban_Player(mob/them in world, reason as text)
world << "<font color=red><B>[src] has banned [them] due to: [reason]"
banlist.Add(them.client.ckey,them.client.computer_id,them.client.address)
var/savefile/sa=new("save/bans.sav")
sa["banlist"]<<banlist
del them
Unban_Player(client/them in banlist)
banlist.Remove(them)
var/savefile/sa=new("save/bans.sav")
sa["banlist"]<<banlist
Problem description:
I understand this is a mess, particularly Unban_Player(), but I'm having trouble understanding how I would save a list that contains client-related information as shown above.
I read info on the << output operator on reference, and it doesn't say it can transfer client data (unless that's relevant to it being able to transfer text). Sometimes, players who get banned are automatically unbanned after the server shuts down and re-opens. Assuming this means the savefile transfer didn't process as I wished it to. While Unban_Player seems to have the same issue with removing client data from a list, and then after the server shuts down, the list goes back to what it was before the verb was used.
What do I need to fix in order to make this work the way I intend to make it work?