void LLFloaterLandHoldings::buttonCore(S32 which)
{
	LLScrollListCtrl *list = getChild<LLScrollListCtrl>("parcel list");
	if (!list) return;

	S32 index = list->getFirstSelectedIndex();
	if (index < 0) return;

	// hidden is always last column
	std::string location = list->getSelectedItemLabel(list->getNumColumns()-1);

	F32 global_x = 0.f;
	F32 global_y = 0.f;
	sscanf(location.c_str(), "%f %f", &global_x, &global_y);

	// Hack: Use the agent's z-height
	F64 global_z = gAgent.getPositionGlobal().mdV[VZ];

	LLVector3d pos_global(global_x, global_y, global_z);

	switch(which)
	{
	case 0:
		gAgent.teleportViaLocation(pos_global);
		gFloaterWorldMap->trackLocation(pos_global);
		break;
	case 1:
		gFloaterWorldMap->trackLocation(pos_global);
		LLFloaterWorldMap::show(NULL, TRUE);
		break;
	default:
		break;
	}
}
// static
void LLFloaterTelehub::addBeacons()
{
	LLFloaterTelehub* floater = LLFloaterReg::findTypedInstance<LLFloaterTelehub>("telehubs");
	if (!floater)
		return;
	
	// Find the telehub position, either our cached old position, or
	// an updated one based on the actual object position.
	LLVector3 hub_pos_region = floater->mTelehubPos;
	LLQuaternion hub_rot = floater->mTelehubRot;
	LLViewerObject* obj = gObjectList.findObject(floater->mTelehubObjectID);
	if (obj)
	{
		hub_pos_region = obj->getPositionRegion();
		hub_rot = obj->getRotationRegion();
	}
	// Draw nice thick 3-pixel lines.
	gObjectList.addDebugBeacon(hub_pos_region, "", LLColor4::yellow, LLColor4::white, 4);

	LLScrollListCtrl* list = floater->getChild<LLScrollListCtrl>("spawn_points_list");
	if (list)
	{
		S32 spawn_index = list->getFirstSelectedIndex();
		if (spawn_index >= 0)
		{
			LLVector3 spawn_pos = hub_pos_region  + (floater->mSpawnPointPos[spawn_index] * hub_rot);
			gObjectList.addDebugBeacon(spawn_pos, "", LLColor4::orange, LLColor4::white, 4);
		}
	}
}
// static
void LLFloaterBlacklist::onClickRemove(void* user_data)
{
	LLFloaterBlacklist* floaterp = (LLFloaterBlacklist*)user_data;
	LLScrollListCtrl* list = floaterp->getChild<LLScrollListCtrl>("file_list");
	if(list->getFirstSelected())
	{
		LLScrollListItem* item = list->getFirstSelected();
		LLUUID selected_id = item->getColumn(0)->getValue().asUUID();
		if(selected_id.isNull()) return;
		list->deleteSingleItem(list->getFirstSelectedIndex());
		blacklist_entries.erase(selected_id);
		updateBlacklists();
		
	}
}
void LLFloaterTelehub::onClickRemoveSpawnPoint()
{
	LLScrollListCtrl* list = getChild<LLScrollListCtrl>("spawn_points_list");
	if (!list)
		return;

	S32 spawn_index = list->getFirstSelectedIndex();
	if (spawn_index < 0) return;  // nothing selected

	LLMessageSystem* msg = gMessageSystem;

	// Could be god or estate owner.  If neither, server will reject message.
	if (gAgent.isGodlike())
	{
		msg->newMessage("GodlikeMessage");
	}
	else
	{
		msg->newMessage("EstateOwnerMessage");
	}
	msg->nextBlock("AgentData");
	msg->addUUID("AgentID", gAgent.getID());
	msg->addUUID("SessionID", gAgent.getSessionID());
	msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used
	msg->nextBlock("MethodData");
	msg->addString("Method", "telehub");
	msg->addUUID("Invoice", LLUUID::null);

	msg->nextBlock("ParamList");
	msg->addString("Parameter", "spawnpoint remove");

	std::string buffer;
	buffer = llformat("%d", spawn_index);
	msg->nextBlock("ParamList");
	msg->addString("Parameter", buffer);

	gAgent.sendReliableMessage();
}