diff options
| -rwxr-xr-x | indra/newview/llavataractions.cpp | 73 | ||||
| -rwxr-xr-x | indra/newview/llviewermessage.cpp | 12 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 6 | 
3 files changed, 51 insertions, 40 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index b65810d357..92e25e1a8b 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -399,43 +399,62 @@ void LLAvatarActions::pay(const LLUUID& id)  void LLAvatarActions::teleport_request_callback(const LLSD& notification, const LLSD& response)  { -	LLMessageSystem* msg = gMessageSystem; - -	msg->newMessageFast(_PREHASH_ImprovedInstantMessage); -	msg->nextBlockFast(_PREHASH_AgentData); -	msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); -	msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - -	msg->nextBlockFast(_PREHASH_MessageBlock); -	msg->addBOOLFast(_PREHASH_FromGroup, FALSE); -	msg->addUUIDFast(_PREHASH_ToAgentID, notification["substitutions"]["uuid"] ); -	msg->addU8Fast(_PREHASH_Offline, IM_ONLINE); -	msg->addU8Fast(_PREHASH_Dialog, IM_TELEPORT_REQUEST); -	msg->addUUIDFast(_PREHASH_ID, LLUUID::null); -	msg->addU32Fast(_PREHASH_Timestamp, NO_TIMESTAMP); // no timestamp necessary - -	std::string name; -	LLAgentUI::buildFullname(name); +	S32 option; +	if (response.isInteger())  +	{ +		option = response.asInteger(); +	} +	else +	{ +		option = LLNotificationsUtil::getSelectedOption(notification, response); +	} -	msg->addStringFast(_PREHASH_FromAgentName, name); -	msg->addStringFast(_PREHASH_Message, response["message"]); -	msg->addU32Fast(_PREHASH_ParentEstateID, 0); -	msg->addUUIDFast(_PREHASH_RegionID, LLUUID::null); -	msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent()); +	if (0 == option) +	{ +		LLMessageSystem* msg = gMessageSystem; -	gMessageSystem->addBinaryDataFast( -			_PREHASH_BinaryBucket, -			EMPTY_BINARY_BUCKET, -			EMPTY_BINARY_BUCKET_SIZE); +		msg->newMessageFast(_PREHASH_ImprovedInstantMessage); +		msg->nextBlockFast(_PREHASH_AgentData); +		msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); +		msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + +		msg->nextBlockFast(_PREHASH_MessageBlock); +		msg->addBOOLFast(_PREHASH_FromGroup, FALSE); +		msg->addUUIDFast(_PREHASH_ToAgentID, notification["substitutions"]["uuid"] ); +		msg->addU8Fast(_PREHASH_Offline, IM_ONLINE); +		msg->addU8Fast(_PREHASH_Dialog, IM_TELEPORT_REQUEST); +		msg->addUUIDFast(_PREHASH_ID, LLUUID::null); +		msg->addU32Fast(_PREHASH_Timestamp, NO_TIMESTAMP); // no timestamp necessary + +		std::string name; +		LLAgentUI::buildFullname(name); + +		msg->addStringFast(_PREHASH_FromAgentName, name); +		msg->addStringFast(_PREHASH_Message, response["message"]); +		msg->addU32Fast(_PREHASH_ParentEstateID, 0); +		msg->addUUIDFast(_PREHASH_RegionID, LLUUID::null); +		msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent()); + +		gMessageSystem->addBinaryDataFast( +				_PREHASH_BinaryBucket, +				EMPTY_BINARY_BUCKET, +				EMPTY_BINARY_BUCKET_SIZE); -	gAgent.sendReliableMessage(); +		gAgent.sendReliableMessage(); +	}  }  // static  void LLAvatarActions::teleportRequest(const LLUUID& id)  { +	std::string name; +	gCacheName->getFullName(id, name); +	gCacheName->cleanFullName(name); +  	LLSD notification;  	notification["uuid"] = id; +	notification["NAME"] = name + "'s"; +  	LLSD payload;  	LLNotificationsUtil::add("TeleportRequestPrompt", notification, payload, teleport_request_callback); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 2dc5fcff85..8d4fab4e9f 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2936,7 +2936,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)  				bool canUserAccessDstRegion = true;  				bool doesUserRequireMaturityIncrease = false; -				if (parse_lure_bucket(region_info, region_handle, pos, look_at, region_access)) +				// Do not parse the (empty) lure bucket for TELEPORT_REQUEST +				if (IM_TELEPORT_REQUEST != dialog && parse_lure_bucket(region_info, region_handle, pos, look_at, region_access))  				{  					region_access_str = LLViewerRegion::accessToString(region_access);  					region_access_icn = LLViewerRegion::getAccessIcon(region_access); @@ -6915,15 +6916,6 @@ bool teleport_request_callback(const LLSD& notification, const LLSD& response)  			LLAvatarActions::startIM(from_id);  		}  		break; - -/*	// Block -	case 3: -		{ -			LLMute mute(from_id, from_name, LLMute::AGENT); -			LLMuteList::getInstance()->add(mute); -			LLPanelBlockedList::showPanelAndSelect(mute.mID); -		} -		break; */  	}  	return false;  } diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 3baf223172..e41f8c8e8c 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -3931,7 +3931,7 @@ Join me in [REGION]     icon="alertmodal.tga"     name="TeleportRequestPrompt"     type="alertmodal"> -Request a teleport to their location with the following message +Request a teleport to [NAME] location with the following message      <tag>confirm</tag>      <form name="form">        <input name="message" type="text"> @@ -6478,7 +6478,7 @@ Your object named <nolink>[OBJECTFROMNAME]</nolink> has given you th     type="offer">  [NAME_SLURL] has offered to teleport you to their location: -“[MESSAGE]” +"[MESSAGE]”  <icon>[MATURITY_ICON]</icon> - [MATURITY_STR]      <tag>confirm</tag>      <form name="form"> @@ -6543,7 +6543,7 @@ However, this region contains content accessible to adults only.  [NAME_SLURL] is requesting to be teleported your to your location.  [MESSAGE] -Will you permit this? +Offer a teleport?      <tag>confirm</tag>      <form name="form">        <button  | 
