anchor.diff:  		player_key = href_list["keytext"]
   		if(!player_key)
   			error_state += "Key was ticked but none was provided."
  +	if(href_list["ipcheck"])
  +		ip_check = TRUE
  +	if(href_list["cidcheck"])
  +		cid_check = TRUE
   	if(href_list["lastconn"])
   		if(player_key)
   			use_last_connection = TRUE
   	else
  -		if(href_list["ipcheck"])
  -			player_ip = href_list["iptext"] || ""
  +		if(ip_check)
  +			player_ip = href_list["iptext"]
   			if(!player_ip && !use_last_connection)
   				error_state += "IP was ticked but none was provided."
  -		if(href_list["cidcheck"])
  -			player_cid = href_list["cidtext"] || ""
  +		if(cid_check)
  +			player_cid = href_list["cidtext"]
   			if(!player_cid && !use_last_connection)
   				error_state += "CID was ticked but none was provided."
   	if(!use_last_connection && !player_ip && !player_cid && !player_key)
   		error_state += "At least a key, IP or CID must be provided."
  +	if(use_last_connection && !ip_check && !cid_check)
  +		error_state += "Use last connection was ticked, but neither IP nor CID was."
   	if(href_list["applyadmins"])
   		applies_to_admins = TRUE
   	switch(href_list["radioduration"])
  
positive.code: 		to_chat(usr, "<span class='danger'>Ban not [edit_id ? "edited" : "created"] because the following errors were present:\n[error_state.Join("\n")]</span>")
  		return
  	if(edit_id)
  		edit_ban(edit_id, player_key, player_ip, player_cid, use_last_connection, applies_to_admins, duration, interval, reason, mirror_edit, old_key, old_ip, old_cid, old_applies, page, admin_key, changes)
  	else
  		create_ban(player_key, player_ip, player_cid, use_last_connection, applies_to_admins, duration, interval, severity, reason, roles_to_ban)
  
  /datum/admins/proc/create_ban(player_key, player_ip, player_cid, use_last_connection, applies_to_admins, duration, interval, severity, reason, list/roles_to_ban)
  	if(!check_rights(R_BAN))
  		return
  	if(!SSdbcore.Connect())
  
negative.code: 			player_key = query_edit_ban_get_player.item[1]
  			bantime = query_edit_ban_get_player.item[2]
  			if(use_last_connection)
  				if(ip_check)
  					player_ip = query_edit_ban_get_player.item[3]
  				if(cid_check)
  					player_cid = query_edit_ban_get_player.item[4]
  		else
  			if(use_last_connection)
  				if(alert(usr, "[player_key]/([player_ckey]) has not been seen before, unable to use IP and CID from last connection. Are you sure you want to edit a ban for them?", "Unknown key", "Yes", "No", "Cancel") != "Yes")
  					qdel(query_edit_ban_get_player)
  					return
  			else
  				if(alert(usr, "[player_key]/([player_ckey]) has not been seen before, are you sure you want to edit a ban for them?", "Unknown key", "Yes", "No", "Cancel") != "Yes")
  					qdel(query_edit_ban_get_player)
  					return
  		qdel(query_edit_ban_get_player)
  	if(applies_to_admins && (applies_to_admins != old_applies))
  		var/admin_ckey = sanitizeSQL(usr.client.ckey)
  