anchor.diff:  		D.associate(C) //link up with the client and add verbs
   	message_admins("[key_name_admin(usr)] edited the permissions of [use_db ? " rank [D.rank.name] permanently" : "[admin_ckey] temporarily"]")
   	log_admin("[key_name(usr)] edited the permissions of [use_db ? " rank [D.rank.name] permanently" : "[admin_ckey] temporarily"]")
  +
  +/datum/admins/proc/sync_lastadminrank(admin_ckey, datum/admins/D)
  +	var/sqlrank = sanitizeSQL(D.rank.name)
  +	admin_ckey = sanitizeSQL(admin_ckey)
  +	var/datum/DBQuery/query_sync_lastadminrank = SSdbcore.NewQuery("UPDATE [format_table_name("player")] SET lastadminrank = '[sqlrank]' WHERE ckey = '[admin_ckey]'")
  +	if(!query_sync_lastadminrank.warn_execute())
  +		return
  +	to_chat(usr, "<span class='admin'>Sync of [admin_ckey] successful.</span>")
  
positive.code: 			deadminlink = " <a class='small' href='?src=[REF(src)];[HrefToken()];editrights=deactivate;ckey=[adm_ckey]'>\[DA\]</a>"
  
  		output += "<tr>"
  		output += "<td style='text-align:right;'>[adm_ckey] [deadminlink]<a class='small' href='?src=[REF(src)];[HrefToken()];editrights=remove;ckey=[adm_ckey]'>\[-\]</a></td>"
  		output += "<td><a href='?src=[REF(src)];[HrefToken()];editrights=rank;ckey=[adm_ckey]'>[D.rank.name]</a></td>"
  		output += "<td><a class='small' href='?src=[REF(src)];[HrefToken()];editrights=permissions;ckey=[adm_ckey]'>[rights2text(D.rank.include_rights," ")]</a></td>"
  		output += "<td><a class='small' href='?src=[REF(src)];[HrefToken()];editrights=permissions;ckey=[adm_ckey]'>[rights2text(D.rank.exclude_rights," ", "-")]</a></td>"
  
negative.code: 			D = GLOB.deadmins[admin_ckey]
  		if(!D)
  			return
  		if((task != "sync") && !check_if_greater_rights_than_holder(D))
  			message_admins("[key_name_admin(usr)] attempted to change the rank of [admin_ckey] without sufficient rights.")
  			log_admin("[key_name(usr)] attempted to change the rank of [admin_ckey] without sufficient rights.")
  			return
  	switch(task)
  		if("add")
  			admin_ckey = add_admin(use_db)
  