anchor.diff:  			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
  +	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."
  +			GLOB.world_game_log << "Failed to connect to database in load_admins(). Reverting to legacy system."
   			config.admin_legacy_system = 1
   			load_admins()
   			return
  
positive.code: 		if("add")
  			var/new_ckey = ckey(input(usr,"New admin's ckey","Admin ckey", null) as text|null)
  			if(!new_ckey)
  				return
  			if(new_ckey in GLOB.admin_datums)
  				to_chat(usr, "<font color='red'>Error: Topic 'editrights': [new_ckey] is already an admin</font>")
  				return
  			adm_ckey = new_ckey
  
negative.code: /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()
  