anchor.diff:  /datum/admins/proc/updateranktodb(ckey,newrank)
   	if(!SSdbcore.Connect())
   		return
  +	if(!check_rights(R_PERMISSIONS))
  + 		return
   	var/sql_ckey = sanitizeSQL(ckey)
   	var/sql_admin_rank = sanitizeSQL(newrank)
  -
  +
   	var/datum/DBQuery/query_admin_rank_update = SSdbcore.NewQuery("UPDATE [format_table_name("player")] SET lastadminrank = '[sql_admin_rank]' WHERE ckey = '[sql_ckey]'")
  -	query_admin_rank_update.Execute()
  +	query_admin_rank_update.Execute()
  
positive.code: 				prev = next
  
  			previous_rights = R.rights
  	else
  		if(!SSdbcore.Connect())
  			log_world("Failed to connect to database in load_admin_ranks(). Reverting to legacy system.")
  			GLOB.world_game_log << "Failed to connect to database in load_admin_ranks(). Reverting to legacy system."
  			config.admin_legacy_system = 1
  			load_admin_ranks()
  			return
  
negative.code: 			if(D.rank.rights & R_DEBUG) //grant profile access
  				world.SetConfig("APP/admin", ckey, "role=admin")
  			D.associate(GLOB.directory[ckey])	//find the client for a ckey if they are connected and associate them with the new admin datum
  	else
  		if(!SSdbcore.Connect())
  			log_world("Failed to connect to database in load_admins(). Reverting to legacy system.")
  			GLOB.world_game_log << "Failed to connect to database in load_admins(). Reverting to legacy system."
  			config.admin_legacy_system = 1
  			load_admins()
  			return
  