[RLVa] Yay updates~
e4a6e0d257c1 - fixed : @recvim=n isn't actually blocking the incoming message
35869fc884e9 - internal : minor refactoring of the process of updating the navigation and top info bars when toggling @showloc
9688630000ad - changed : show a limited context menu in the nearby people panel when @shownames restricted
-> "Offer/Request Teleport" (filtered)
$ Singu Change: Adds Recording of teleport offers to chat (if sending less than 10), one day I'll get around to doing this right into IMs
Noticed RLV.EnableIfNot was not being used, so I plugged it in for windlight.
Future Note: This brings us up to 417d759f0fa9 on the RLVa tree.
This commit is contained in:
@@ -506,8 +506,12 @@ void LLAvatarActions::on_avatar_name_cache_teleport_request(const LLUUID& id, co
|
||||
{
|
||||
LLSD notification;
|
||||
notification["uuid"] = id;
|
||||
//notification["NAME_SLURL"] = LLSLURL("agent", id, "about").getSLURLString();
|
||||
std::string name;
|
||||
// [RLVa:KB] - Checked: 2014-03-31 (Catznip-3.6)
|
||||
if (!RlvActions::canShowName(RlvActions::SNC_TELEPORTREQUEST))
|
||||
name = RlvStrings::getAnonym(av_name.getLegacyName());
|
||||
else
|
||||
// [RLVa:KB]
|
||||
LLAvatarNameCache::getPNSName(av_name, name);
|
||||
notification["NAME"] = name;
|
||||
LLSD payload;
|
||||
|
||||
@@ -2523,7 +2523,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
||||
{
|
||||
if (!mute_im)
|
||||
RlvUtil::sendBusyMessage(from_id, RlvStrings::getString(RLV_STRING_BLOCKED_RECVIM_REMOTE), session_id);
|
||||
message = RlvStrings::getString(RLV_STRING_BLOCKED_RECVIM);
|
||||
buffer = RlvStrings::getString(RLV_STRING_BLOCKED_RECVIM);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
@@ -4053,10 +4053,8 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
|
||||
sdQuery["name"] = chat.mFromName;
|
||||
sdQuery["owner"] = owner_id;
|
||||
|
||||
/* Singu Note: We don't use this field, seems like part of llinspectremoteobject
|
||||
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (!is_owned_by_me) )
|
||||
sdQuery["rlv_shownames"] = true;
|
||||
*/
|
||||
|
||||
const LLViewerRegion* pRegion = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent);
|
||||
if (pRegion)
|
||||
@@ -7751,6 +7749,39 @@ void send_lures(const LLSD& notification, const LLSD& response)
|
||||
|
||||
msg->nextBlockFast(_PREHASH_TargetData);
|
||||
msg->addUUIDFast(_PREHASH_TargetID, target_id);
|
||||
// Record the offer.
|
||||
if (notification["payload"]["ids"].size() < 10) // Singu Note: Do NOT spam chat!
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2014-03-31 (Catznip-3.6)
|
||||
bool fRlvHideName = notification["payload"]["rlv_shownames"].asBoolean();
|
||||
// [/RLVa:KB]
|
||||
std::string target_name;
|
||||
gCacheName->getFullName(target_id, target_name); // for im log filenames
|
||||
|
||||
LLSD args;
|
||||
// [RLVa:KB] - Checked: 2014-03-31 (Catznip-3.6)
|
||||
if (fRlvHideName)
|
||||
target_name = RlvStrings::getAnonym(target_name);
|
||||
else
|
||||
// [/RLVa:KB]
|
||||
LLAvatarNameCache::getPNSName(target_id, target_name);
|
||||
args["TO_NAME"] = target_name;
|
||||
|
||||
LLSD payload;
|
||||
|
||||
//*TODO please rewrite all keys to the same case, lower or upper
|
||||
payload["from_id"] = target_id;
|
||||
payload["SUPPRESS_TOAST"] = true;
|
||||
LLNotificationsUtil::add("TeleportOfferSent", args, payload);
|
||||
|
||||
/* Singu TODO?
|
||||
// [RLVa:KB] - Checked: 2014-03-31 (Catznip-3.6)
|
||||
if (!fRlvHideName)
|
||||
LLRecentPeople::instance().add(target_id);
|
||||
// [/RLVa:KB]
|
||||
// LLRecentPeople::instance().add(target_id);
|
||||
*/
|
||||
}
|
||||
}
|
||||
gAgent.sendReliableMessage();
|
||||
}
|
||||
@@ -7795,8 +7826,7 @@ void handle_lure(const uuid_vec_t& ids)
|
||||
|
||||
LLSD edit_args;
|
||||
// [RLVa:KB] - Checked: 2010-04-07 (RLVa-1.2.0d) | Modified: RLVa-1.0.0a
|
||||
edit_args["REGION"] =
|
||||
(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? gAgent.getRegion()->getName() : RlvStrings::getString(RLV_STRING_HIDDEN);
|
||||
edit_args["REGION"] = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? gAgent.getRegion()->getName() : RlvStrings::getString(RLV_STRING_HIDDEN);
|
||||
// [/RLVa:KB]
|
||||
//edit_args["REGION"] = gAgent.getRegion()->getName();
|
||||
|
||||
@@ -7816,6 +7846,7 @@ void handle_lure(const uuid_vec_t& ids)
|
||||
return;
|
||||
}
|
||||
}
|
||||
payload["rlv_shownames"] = !RlvActions::canShowName(RlvActions::SNC_TELEPORTOFFER);
|
||||
// [/RLVa:KB]
|
||||
payload["ids"].append(*it);
|
||||
}
|
||||
|
||||
@@ -21,9 +21,11 @@
|
||||
#include "rlvhandler.h"
|
||||
|
||||
// ============================================================================
|
||||
// RlvActions member functions
|
||||
// Communication/Avatar interaction
|
||||
//
|
||||
|
||||
bool RlvActions::s_BlockNamesContexts[SNC_COUNT] = { 0 };
|
||||
|
||||
// Checked: 2010-11-30 (RLVa-1.3.0)
|
||||
bool RlvActions::canReceiveIM(const LLUUID& idSender)
|
||||
{
|
||||
@@ -60,6 +62,10 @@ bool RlvActions::canStartIM(const LLUUID& idRecipient)
|
||||
( (!gRlvHandler.hasBehaviour(RLV_BHVR_STARTIMTO)) || (!gRlvHandler.isException(RLV_BHVR_STARTIMTO, idRecipient)) ) );
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Movement
|
||||
//
|
||||
|
||||
// Checked: 2010-12-11 (RLVa-1.2.2)
|
||||
bool RlvActions::canAcceptTpOffer(const LLUUID& idSender)
|
||||
{
|
||||
@@ -84,6 +90,10 @@ bool RlvActions::autoAcceptTeleportRequest(const LLUUID& idRequester)
|
||||
return ((idRequester.notNull()) && (gRlvHandler.isException(RLV_BHVR_ACCEPTTPREQUEST, idRequester))) || (gRlvHandler.hasBehaviour(RLV_BHVR_ACCEPTTPREQUEST));
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// World interaction
|
||||
//
|
||||
|
||||
// Checked: 2010-03-07 (RLVa-1.2.0)
|
||||
bool RlvActions::canStand()
|
||||
{
|
||||
@@ -97,6 +107,10 @@ bool RlvActions::canShowLocation()
|
||||
return !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC);
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Helper functions
|
||||
//
|
||||
|
||||
// Checked: 2013-05-10 (RLVa-1.4.9)
|
||||
bool RlvActions::hasBehaviour(ERlvBehaviour eBhvr)
|
||||
{
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
|
||||
class RlvActions
|
||||
{
|
||||
// =============
|
||||
// Communication
|
||||
// =============
|
||||
// ================================
|
||||
// Communication/Avatar interaction
|
||||
// ================================
|
||||
public:
|
||||
/*
|
||||
* Returns true if the user is allowed to receive IMs from the specified sender (can be an avatar or a group)
|
||||
@@ -44,6 +44,19 @@ public:
|
||||
*/
|
||||
static bool canStartIM(const LLUUID& idRecipient); // @startim and @startimto
|
||||
|
||||
/*
|
||||
* Returns true if an avatar's name should be hidden for the requested operation/context
|
||||
* (This is used to hide an avatar name in one case but not a near-identical case - such as teleporting a friend vs a nearby agent -
|
||||
* in a way that limits the amount of code that needs to be changed to carry context from one function to another)
|
||||
*/
|
||||
enum EShowNamesContext { SNC_TELEPORTOFFER = 0, SNC_TELEPORTREQUEST, SNC_COUNT };
|
||||
static bool canShowName(EShowNamesContext eContext) { return (eContext < SNC_COUNT) ? !s_BlockNamesContexts[eContext] : false; }
|
||||
static void setShowName(EShowNamesContext eContext, bool fShowName) { if ( (eContext < SNC_COUNT) && (isRlvEnabled()) ) { s_BlockNamesContexts[eContext] = !fShowName; } }
|
||||
|
||||
protected:
|
||||
// Backwards logic so that we can initialize to 0 and it won't block when we forget to/don't check if RLVa is disabled
|
||||
static bool s_BlockNamesContexts[SNC_COUNT];
|
||||
|
||||
// ========
|
||||
// Movement
|
||||
// ========
|
||||
|
||||
@@ -261,8 +261,12 @@ void RlvUIEnabler::onToggleShowLoc()
|
||||
{
|
||||
bool fEnable = !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC);
|
||||
|
||||
// RELEASE-RLVa: [SL-2.0.1] Check that the code below still evaluates to *only* LLNavigationBar::instance().mCmbLocation->refresh()
|
||||
//LLAppViewer::instance()->handleLoginComplete();
|
||||
/* Singu TODO: LLNavigationBar
|
||||
if (LLNavigationBar::instanceExists())
|
||||
LLNavigationBar::instance().refreshLocationCtrl();
|
||||
if (LLPanelTopInfoBar::instanceExists())
|
||||
LLPanelTopInfoBar::instance().update();
|
||||
*/
|
||||
|
||||
if (!fEnable)
|
||||
{
|
||||
|
||||
@@ -617,22 +617,27 @@
|
||||
<menu_item_call bottom="-29" enabled="true" height="19" label="Sunrise" left="0"
|
||||
mouse_opaque="true" name="Sunrise" width="169">
|
||||
<on_click function="World.EnvSettings" userdata="sunrise" />
|
||||
<on_enable function="RLV.EnableIfNot" userdata="setenv"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call bottom="-48" enabled="true" height="19" label="Midday" left="0"
|
||||
mouse_opaque="true" name="Noon" shortcut="control|shift|Y" width="169">
|
||||
<on_click function="World.EnvSettings" userdata="noon" />
|
||||
<on_enable function="RLV.EnableIfNot" userdata="setenv"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call bottom="-67" enabled="true" height="19" label="Sunset" left="0"
|
||||
mouse_opaque="true" name="Sunset" shortcut="control|shift|N" width="169">
|
||||
<on_click function="World.EnvSettings" userdata="sunset" />
|
||||
<on_enable function="RLV.EnableIfNot" userdata="setenv"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call bottom="-86" enabled="true" height="19" label="Midnight" left="0"
|
||||
mouse_opaque="true" name="Midnight" width="169">
|
||||
<on_click function="World.EnvSettings" userdata="midnight" />
|
||||
<on_enable function="RLV.EnableIfNot" userdata="setenv"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call bottom="-105" enabled="false" height="19" label="Revert to Region Default"
|
||||
left="0" mouse_opaque="true" name="Revert to Region Default" width="169">
|
||||
<on_click function="World.EnvSettings" userdata="default" />
|
||||
<on_enable function="RLV.EnableIfNot" userdata="setenv"/>
|
||||
</menu_item_call>
|
||||
<menu_item_separator bottom="-113" enabled="true" height="8" label="-----------" left="0"
|
||||
mouse_opaque="true" name="separator" width="169" />
|
||||
|
||||
@@ -6796,6 +6796,16 @@ An object named [OBJECTFROMNAME] owned by (an unknown user) has given you a [OBJ
|
||||
</form>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="notify.tga"
|
||||
name="TeleportOfferSent"
|
||||
log_to_im="true"
|
||||
log_to_chat="false"
|
||||
show_toast="false"
|
||||
type="notifytip">
|
||||
Teleport offer sent to [TO_NAME]
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="notify.tga"
|
||||
name="TeleportRequest"
|
||||
|
||||
Reference in New Issue
Block a user