anchor.diff:  			D.rank.rights = new_flags &= ~new_exclude_flags
   			D.rank.include_rights = new_flags
   			D.rank.exclude_rights = new_exclude_flags
  +			D.rank.can_edit_rights = new_can_edit_flags
   		var/client/C = GLOB.directory[admin_ckey] //find the client with the specified ckey (if they are logged in)
   		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"]")
  
positive.code: 	var/new_can_edit_flags = input_bitfield(usr, "Editable permission flags<br>These are the flags this rank is allowed to edit if they have access to the permissions panel.<br>They will be unable to modify admins to a rank that has a flag not included here.<br>[use_db ? "This will affect ALL admins with this rank." : "This will affect only the current admin [admin_ckey]"]", "admin_flags", D.rank.can_edit_rights, 350, 710, allowed_edit_list = usr.client.holder.rank.can_edit_rights)
  	if(isnull(new_can_edit_flags))
  		return
  	if(use_db)
  		var/old_flags
  		var/old_exclude_flags
  		var/old_can_edit_flags
  
negative.code: 	log_admin("[key_name(usr)] forcefully deadmined [admin_ckey]")
  	D.deactivate() //after logs so the deadmined admin can see the message.
  
  /datum/admins/proc/change_admin_rank(admin_ckey, use_db, datum/admins/D, legacy_only)
  	var/datum/admin_rank/R
  	var/list/rank_names = list()
  	if(!use_db || (use_db && !legacy_only))
  		rank_names += "*New Rank*"
  	for(R in GLOB.admin_ranks)
  		if((R.rights & usr.client.holder.rank.can_edit_rights) == R.rights)
  			rank_names[R.name] = R
  