From 75e217b82e57082f4702b9ea02da1f82cda3a44c Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sun, 10 Apr 2016 14:07:23 +0200 Subject: [PATCH 1/5] Code review: RLVa extensions are no longer optional features -> @accepttprequest will auto-accept all incoming teleport requests (allows exceptions - see @accepttp) -> @allowidle (stays experimental - subject to change) -> @getcommand: can be used to discover which commands are part of the user's RLVa implementation (with user-defined separator) -> @findfolders: works like @findfolder but will return all matches (with user-defined separator) -> @getdebug: can be used to query (but not set) the "RestrainedLoveforbidGiveToRLV", "RestrainedLoveNoSetEnv" and "WindLightUseAtmosShaders" debug settings -> @interact will block world interaction but allows drag-drop, the camera tool, mouse steering and access to the "self" context menu -> @sharedwear is the counterpart of @unsharedwear and wear locks the shared #RLV folder -> @sharedunwear is the counterpart of @unsharedunwear and remove locks the shared #RLV folder -> @touchhud will prevent the user from touching/clicking on their HUD attachments (allows exceptions) -> @tprequest will prevent the user from requesting teleports (allows exceptions - see @tplure) -> force wear commands will activate/deactivate gestures as well -> force wear commands will collect from folder links as well -> [FIXED] Location on incoming teleport requests isn't censored when @showloc restricted -> [FIXED] Message on outgoing teleport offers isn't censored when @startim restricted -> [FIXED] Message on outgoing teleport requests isn't censored when @sendim or @startim restricted --HG-- branch : RLVa --- indra/newview/llagent.cpp | 6 +--- indra/newview/llappviewer.cpp | 6 +--- indra/newview/llavataractions.cpp | 20 +++++++++-- indra/newview/llgroupactions.cpp | 4 +-- indra/newview/llinventorybridge.cpp | 2 +- indra/newview/llnotificationalerthandler.cpp | 2 +- indra/newview/llnotificationofferhandler.cpp | 2 +- indra/newview/llselectmgr.cpp | 11 +++--- indra/newview/llstartup.cpp | 4 --- indra/newview/lltoolpie.cpp | 15 ++++---- indra/newview/llviewermessage.cpp | 37 +++++++++----------- indra/newview/llviewerwindow.cpp | 10 +++--- indra/newview/rlvactions.cpp | 9 ++--- indra/newview/rlvactions.h | 4 +-- indra/newview/rlvcommon.cpp | 22 +++++------- indra/newview/rlvcommon.h | 2 -- indra/newview/rlvdefines.h | 34 ------------------ indra/newview/rlvextensions.cpp | 8 ++--- indra/newview/rlvhandler.cpp | 15 -------- indra/newview/rlvhelper.cpp | 4 +-- indra/newview/rlvinventory.cpp | 4 --- indra/newview/rlvui.cpp | 2 -- 22 files changed, 75 insertions(+), 148 deletions(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 9c0628b598..100db8e9e8 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -2455,15 +2455,11 @@ void LLAgent::onAnimStop(const LLUUID& id) } else if (id == ANIM_AGENT_AWAY) { -// clearAFK(); // [RLVa:KB] - Checked: 2010-05-03 (RLVa-1.2.0g) | Added: RLVa-1.1.0g -#ifdef RLV_EXTENSION_CMD_ALLOWIDLE if (!gRlvHandler.hasBehaviour(RLV_BHVR_ALLOWIDLE)) clearAFK(); -#else - clearAFK(); -#endif // RLV_EXTENSION_CMD_ALLOWIDLE // [/RLVa:KB] +// clearAFK(); } else if (id == ANIM_AGENT_STANDUP) { diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 6bf891e50a..69a3a5bcb1 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -491,15 +491,11 @@ void idle_afk_check() { // check idle timers F32 current_idle = gAwayTriggerTimer.getElapsedTimeF32(); -// F32 afk_timeout = gSavedSettings.getS32("AFKTimeout"); // [RLVa:KB] - Checked: 2010-05-03 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g -#ifdef RLV_EXTENSION_CMD_ALLOWIDLE // Enforce an idle time of 30 minutes if @allowidle=n restricted F32 afk_timeout = (!gRlvHandler.hasBehaviour(RLV_BHVR_ALLOWIDLE)) ? gSavedSettings.getS32("AFKTimeout") : 60 * 30; -#else - F32 afk_timeout = gSavedSettings.getS32("AFKTimeout"); -#endif // RLV_EXTENSION_CMD_ALLOWIDLE // [/RLVa:KB] +// F32 afk_timeout = gSavedSettings.getS32("AFKTimeout"); if (afk_timeout && (current_idle > afk_timeout) && ! gAgent.getAFK()) { LL_INFOS("IdleAway") << "Idle more than " << afk_timeout << " seconds: automatically changing to Away status" << LL_ENDL; diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 6f9dfc4c01..9b6aa0e1bb 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -208,7 +208,7 @@ void LLAvatarActions::startIM(const LLUUID& id) return; // [RLVa:KB] - Checked: 2013-05-09 (RLVa-1.4.9) - if ( (!RlvActions::canStartIM(id)) && (!RlvActions::hasOpenP2PSession(id)) ) + if (!RlvActions::canStartIM(id)) { make_ui_sound("UISndInvalidOp"); RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("agent", id, "completename").getSLURLString())); @@ -253,7 +253,7 @@ void LLAvatarActions::startCall(const LLUUID& id) } // [RLVa:KB] - Checked: 2013-05-09 (RLVa-1.4.9) - if ( (!RlvActions::canStartIM(id)) && (!RlvActions::hasOpenP2PSession(id)) ) + if (!RlvActions::canStartIM(id)) { make_ui_sound("UISndInvalidOp"); RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("agent", id, "completename").getSLURLString())); @@ -460,6 +460,17 @@ void LLAvatarActions::teleport_request_callback(const LLSD& notification, const { LLMessageSystem* msg = gMessageSystem; +// [RLVa:KB] - Checked: RLVa-2.0.0 + const LLUUID idRecipient = notification["substitutions"]["uuid"]; + std::string strMessage = response["message"]; + + // Filter the request message if the recipients is IM-blocked + if ( (!RlvActions::isRlvEnabled()) || ((RlvActions::canStartIM(idRecipient)) && (RlvActions::canSendIM(idRecipient))) ) + { + strMessage = RlvStrings::getString(RLV_STRING_HIDDEN); + } +// [/RLVa:KB] + msg->newMessageFast(_PREHASH_ImprovedInstantMessage); msg->nextBlockFast(_PREHASH_AgentData); msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); @@ -477,7 +488,10 @@ void LLAvatarActions::teleport_request_callback(const LLSD& notification, const LLAgentUI::buildFullname(name); msg->addStringFast(_PREHASH_FromAgentName, name); - msg->addStringFast(_PREHASH_Message, response["message"]); +// [RLVa:KB] - Checked: RLVa-2.0.0 + msg->addStringFast(_PREHASH_Message, strMessage); +// [/RLVa:KB] +// msg->addStringFast(_PREHASH_Message, response["message"]); msg->addU32Fast(_PREHASH_ParentEstateID, 0); msg->addUUIDFast(_PREHASH_RegionID, LLUUID::null); msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent()); diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index fd8134b168..aaa5952ef7 100755 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -212,7 +212,7 @@ void LLGroupActions::startCall(const LLUUID& group_id) } // [RLVa:KB] - Checked: 2013-05-09 (RLVa-1.4.9) - if ( (!RlvActions::canStartIM(group_id)) && (!RlvActions::hasOpenGroupSession(group_id)) ) + if (!RlvActions::canStartIM(group_id)) { make_ui_sound("UISndInvalidOp"); RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("group", group_id, "about").getSLURLString())); @@ -452,7 +452,7 @@ LLUUID LLGroupActions::startIM(const LLUUID& group_id) if (group_id.isNull()) return LLUUID::null; // [RLVa:KB] - Checked: 2013-05-09 (RLVa-1.4.9) - if ( (!RlvActions::canStartIM(group_id)) && (!RlvActions::hasOpenGroupSession(group_id)) ) + if (!RlvActions::canStartIM(group_id)) { make_ui_sound("UISndInvalidOp"); RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("group", group_id, "about").getSLURLString())); diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 33ec3a26b7..f6be12747c 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -5548,7 +5548,7 @@ void LLCallingCardBridge::performAction(LLInventoryModel* model, std::string act } // [RLVa:KB] - Checked: 2013-05-08 (RLVa-1.4.9) - if ( (!RlvActions::canStartIM(item->getCreatorUUID())) && (!RlvActions::hasOpenP2PSession(item->getCreatorUUID())) ) + if (!RlvActions::canStartIM(item->getCreatorUUID())) { make_ui_sound("UISndInvalidOp"); RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("agent", item->getCreatorUUID(), "completename").getSLURLString())); diff --git a/indra/newview/llnotificationalerthandler.cpp b/indra/newview/llnotificationalerthandler.cpp index 9d2810cb37..1058c3836c 100755 --- a/indra/newview/llnotificationalerthandler.cpp +++ b/indra/newview/llnotificationalerthandler.cpp @@ -97,7 +97,7 @@ bool LLAlertHandler::processNotification(const LLNotificationPtr& notification) // - LLHandlerUtil::logToIMP2P() below will still be called with to_file_only == false // - LLHandlerUtil::logToIM() will eventually be called as a result and without an open IM session it will log the // same message as it would for an open session whereas to_file_only == true would take a different code path - if ( (RlvActions::hasOpenP2PSession(from_id)) || (RlvActions::canStartIM(from_id)) ) + if (RlvActions::canStartIM(from_id)) { // [/RLVa:KB] // firstly create session... diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index dc16aea84d..379edb19e5 100755 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -113,7 +113,7 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification) // [RLVa:KB] - Checked: 2013-05-09 (RLVa-1.4.9) // Don't spawn an IM session for non-chat related events - if ( (RlvActions::hasOpenP2PSession(from_id)) || (RlvActions::canStartIM(from_id)) ) + if (RlvActions::canStartIM(from_id)) { // [/RLVa:KB] LLHandlerUtil::spawnIMSession(name, from_id); diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 80be814492..193f28b9d7 100755 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -4305,7 +4305,7 @@ void LLSelectMgr::convertTransient() void LLSelectMgr::deselectAllIfTooFar() { -// [RLVa:KB] - Checked: 2010-11-29 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c +// [RLVa:KB] - Checked: RLVa-1.3.0 if ( (!mSelectedObjects->isEmpty()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_EDITOBJ))) ) { struct NotTransientOrFocusedMediaOrEditable : public LLSelectedNodeFunctor @@ -4313,8 +4313,7 @@ void LLSelectMgr::deselectAllIfTooFar() bool apply(LLSelectNode* pNode) { const LLViewerObject* pObj = pNode->getObject(); - return (!pNode->isTransient()) && (pObj) && (!gRlvHandler.canEdit(pObj)) && - (pObj->getID() != LLViewerMediaFocus::getInstance()->getFocusedObjectID()); + return (!pNode->isTransient()) && (pObj) && (!gRlvHandler.canEdit(pObj)) && (pObj->getID() != LLViewerMediaFocus::getInstance()->getFocusedObjectID()); } } f; if (mSelectedObjects->getFirstRootNode(&f, TRUE)) @@ -4327,15 +4326,13 @@ void LLSelectMgr::deselectAllIfTooFar() return; } -// [RLVa:KB] - Checked: 2010-05-03 (RLVa-1.2.0g) | Modified: RLVa-1.1.0l -#ifdef RLV_EXTENSION_CMD_INTERACT - // [Fall-back code] Don't allow an active selection (except for HUD attachments - see above) when @interact=n restricted +// [RLVa:KB] - Checked: RLVa-1.2.0 + // [Fall-back code] Don't allow an active selection (except for HUD attachments - see above) when @interact restricted if (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT)) { deselectAll(); return; } -#endif // RLV_EXTENSION_CMD_INTERACT // [/RLVa:KB] // HACK: Don't deselect when we're navigating to rate an object's diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index aa94967b5a..f6c6b98e3f 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1006,11 +1006,7 @@ bool idle_startup() // All accounts have both a home and a last location, and we don't support // more locations than that. Choose the appropriate one. JC // [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-0.2.1d -#ifndef RLV_EXTENSION_STARTLOCATION - if (rlv_handler_t::isEnabled()) -#else if ( (rlv_handler_t::isEnabled()) && (RlvSettings::getLoginLastLocation()) ) -#endif // RLV_EXTENSION_STARTLOCATION { // Force login at the last location LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_LAST)); diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index f4340d8726..532d902e5c 100755 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -1271,14 +1271,17 @@ BOOL LLToolPie::handleToolTip(S32 local_x, S32 local_y, MASK mask) { if (!LLUI::sSettingGroups["config"]->getBOOL("ShowHoverTips")) return TRUE; if (!mHoverPick.isValid()) return TRUE; -// [RLVa:KB] - Checked: 2010-05-03 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g -#ifdef RLV_EXTENSION_CMD_INTERACT - if (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT)) return TRUE; -#endif // RLV_EXTENSION_CMD_INTERACT -// [/RLVa:KB] LLViewerObject* hover_object = mHoverPick.getObject(); - + +// [RLVa:KB] - Checked: RLVa-1.2.0 + // NOTE: handleTooltipObject() will block HUD tooltips anyway but technically interact should only interfere with world interaction + if ( (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT)) && (hover_object) && (!hover_object->isHUDAttachment()) ) + { + return TRUE; + } +// [/RLVa:KB] + // update hover object and hover parcel LLSelectMgr::getInstance()->setHoverObject(hover_object, mHoverPick.mObjectFace); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index d52bbf0819..d83b2e800f 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3244,7 +3244,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) case IM_LURE_USER: case IM_TELEPORT_REQUEST: { -// [RLVa:KB] - Checked: 2013-11-08 (RLVa-1.4.9) +// [RLVa:KB] - Checked: RLVa-1.4.9 // If we auto-accept the offer/request then this will override DnD status (but we'll still let the other party know later) bool fRlvAutoAccept = (rlv_handler_t::isEnabled()) && ( ((IM_LURE_USER == dialog) && (RlvActions::autoAcceptTeleportOffer(from_id))) || @@ -3256,7 +3256,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) return; } // else if (is_do_not_disturb) -// [RLVa:KB] - Checked: 2013-11-08 (RLVa-1.4.9) +// [RLVa:KB] - Checked: RLVa-1.4.9 else if ( (is_do_not_disturb) && (!fRlvAutoAccept) ) // [/RLVa:KB] { @@ -3321,7 +3321,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } } -// [RLVa:KB] - Checked: 2013-11-08 (RLVa-1.4.9) +// [RLVa:KB] - Checked: RLVa-1.4.9 if (rlv_handler_t::isEnabled()) { if ( ((IM_LURE_USER == dialog) && (!RlvActions::canAcceptTpOffer(from_id))) || @@ -3333,8 +3333,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) return; } - // Censor lure message if: 1) restricted from receiving IMs from the sender, or 2) teleport offer and @showloc=n restricted - if ( (!RlvActions::canReceiveIM(from_id)) || ((IM_LURE_USER == dialog) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))) ) + // Censor message if: 1) restricted from receiving IMs from the sender, or 2) teleport offer/request and @showloc=n restricted + if ( (!RlvActions::canReceiveIM(from_id)) || + ((gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) && (IM_LURE_USER == dialog || IM_TELEPORT_REQUEST == dialog)) ) { message = RlvStrings::getString(RLV_STRING_HIDDEN); } @@ -3390,8 +3391,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) params.substitutions = args; params.payload = payload; -// [RLVa:KB] - Checked: 20103-11-08 (RLVa-1.4.9) - if ( (rlv_handler_t::isEnabled()) && (fRlvAutoAccept) ) +// [RLVa:KB] - Checked: RLVa-1.4.9 + if (fRlvAutoAccept) { if (IM_LURE_USER == dialog) gRlvHandler.setCanCancelTp(false); @@ -7539,20 +7540,14 @@ void send_lures(const LLSD& notification, const LLSD& response) LLAgentUI::buildSLURL(slurl); text.append("\r\n").append(slurl.getSLURLString()); -// [RLVa:KB] - Checked: 2010-11-30 (RLVa-1.3.0) - if ( (RlvActions::hasBehaviour(RLV_BHVR_SENDIM)) || (RlvActions::hasBehaviour(RLV_BHVR_SENDIMTO)) ) - { - // Filter the lure message if one of the recipients of the lure can't be sent an IM to - for (LLSD::array_const_iterator it = notification["payload"]["ids"].beginArray(); - it != notification["payload"]["ids"].endArray(); ++it) - { - if (!RlvActions::canSendIM(it->asUUID())) - { - text = RlvStrings::getString(RLV_STRING_HIDDEN); - break; - } - } - } +// [RLVa:KB] - Checked: RLVa-2.0.0 + // Filter the lure message if any of the recipients are IM-blocked + const LLSD& sdRecipients = notification["payload"]["ids"]; + if ( (gRlvHandler.isEnabled()) && + (std::any_of(sdRecipients.beginArray(), sdRecipients.endArray(), [](const LLSD& id) { return !RlvActions::canStartIM(id.asUUID()) || !RlvActions::canSendIM(id.asUUID()); })) ) + { + text = RlvStrings::getString(RLV_STRING_HIDDEN); + } // [/RLVa:KB] LLMessageSystem* msg = gMessageSystem; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 8c4f8abd04..dc035026e3 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4049,8 +4049,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de } } -// [RLVa:KB] - Checked: 2010-01-02 (RLVa-1.1.0l) | Added: RLVa-1.1.0l -#ifdef RLV_EXTENSION_CMD_INTERACT +// [RLVa:KB] - Checked: RLVa-1.2.0 if ( (rlv_handler_t::isEnabled()) && (found) && (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT)) ) { // Allow picking if: @@ -4059,14 +4058,13 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de // - the pie tool is active *and* we picked our own avie (allows "mouse steering" and the self pie menu) LLTool* pCurTool = LLToolMgr::getInstance()->getCurrentTool(); if ( (LLToolDragAndDrop::getInstance() != pCurTool) && - (!LLToolCamera::getInstance()->hasMouseCapture()) && - ((LLToolPie::getInstance() != pCurTool) || (gAgent.getID() != found->getID())) ) + (!LLToolCamera::getInstance()->hasMouseCapture()) && + ((LLToolPie::getInstance() != pCurTool) || (gAgent.getID() != found->getID())) ) { found = NULL; } -#endif // RLV_EXTENSION_CMD_INTERACT -// [/RLVa:KB] } +// [/RLVa:KB] } return found; diff --git a/indra/newview/rlvactions.cpp b/indra/newview/rlvactions.cpp index b97e060de3..cf0ef6744f 100644 --- a/indra/newview/rlvactions.cpp +++ b/indra/newview/rlvactions.cpp @@ -50,41 +50,38 @@ bool RlvActions::canSendIM(const LLUUID& idRecipient) ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SENDIMTO)) || (!gRlvHandler.isException(RLV_BHVR_SENDIMTO, idRecipient)) ) ); } -// Checked: 2011-04-12 (RLVa-1.3.0) bool RlvActions::canStartIM(const LLUUID& idRecipient) { // User can start an IM session with "recipient" (could be an agent or a group) if: // - not generally restricted from starting IM sessions (or the recipient is an exception) // - not specifically restricted from starting an IM session with the recipient + // - the session already exists return (!rlv_handler_t::isEnabled()) || ( ( (!gRlvHandler.hasBehaviour(RLV_BHVR_STARTIM)) || (gRlvHandler.isException(RLV_BHVR_STARTIM, idRecipient)) ) && - ( (!gRlvHandler.hasBehaviour(RLV_BHVR_STARTIMTO)) || (!gRlvHandler.isException(RLV_BHVR_STARTIMTO, idRecipient)) ) ); + ( (!gRlvHandler.hasBehaviour(RLV_BHVR_STARTIMTO)) || (!gRlvHandler.isException(RLV_BHVR_STARTIMTO, idRecipient)) ) ) || + ( (hasOpenP2PSession(idRecipient)) || (hasOpenGroupSession(idRecipient)) ); } // ============================================================================ // Movement // -// Checked: 2010-12-11 (RLVa-1.2.2) bool RlvActions::canAcceptTpOffer(const LLUUID& idSender) { return ((!gRlvHandler.hasBehaviour(RLV_BHVR_TPLURE)) || (gRlvHandler.isException(RLV_BHVR_TPLURE, idSender))) && (canStand()); } -// Checked: 2013-11-08 (RLVa-1.4.9) bool RlvActions::autoAcceptTeleportOffer(const LLUUID& idSender) { return ((idSender.notNull()) && (gRlvHandler.isException(RLV_BHVR_ACCEPTTP, idSender))) || (gRlvHandler.hasBehaviour(RLV_BHVR_ACCEPTTP)); } -// Checked: 2013-11-08 (RLVa-1.4.9) bool RlvActions::canAcceptTpRequest(const LLUUID& idSender) { return (!gRlvHandler.hasBehaviour(RLV_BHVR_TPREQUEST)) || (gRlvHandler.isException(RLV_BHVR_TPREQUEST, idSender)); } -// Checked: 2013-11-08 (RLVa-1.4.9) bool RlvActions::autoAcceptTeleportRequest(const LLUUID& idRequester) { return ((idRequester.notNull()) && (gRlvHandler.isException(RLV_BHVR_ACCEPTTPREQUEST, idRequester))) || (gRlvHandler.hasBehaviour(RLV_BHVR_ACCEPTTPREQUEST)); diff --git a/indra/newview/rlvactions.h b/indra/newview/rlvactions.h index fbc8ab12ba..4cf02caf7c 100644 --- a/indra/newview/rlvactions.h +++ b/indra/newview/rlvactions.h @@ -40,9 +40,9 @@ public: static bool canSendIM(const LLUUID& idRecipient); /* - * Returns true if the user is allowed to start a - P2P or group - conversation with the specified UUID. + * Returns true if the user is allowed to start a - P2P or group - conversation with the specified UUID (or if the session already exists) */ - static bool canStartIM(const LLUUID& idRecipient); // @startim and @startimto + static bool canStartIM(const LLUUID& idRecipient); /* * Returns true if an avatar's name should be hidden for the requested operation/context diff --git a/indra/newview/rlvcommon.cpp b/indra/newview/rlvcommon.cpp index e37216403c..ae8d1e380c 100644 --- a/indra/newview/rlvcommon.cpp +++ b/indra/newview/rlvcommon.cpp @@ -96,11 +96,9 @@ void RlvSettings::initClass() if (gSavedSettings.controlExists(RLV_SETTING_SHOWNAMETAGS)) gSavedSettings.getControl(RLV_SETTING_SHOWNAMETAGS)->getSignal()->connect(boost::bind(&onChangedSettingBOOL, _2, &fShowNameTags)); -#ifdef RLV_EXTENSION_STARTLOCATION // Don't allow toggling RLVaLoginLastLocation from the debug settings floater if (gSavedPerAccountSettings.controlExists(RLV_SETTING_LOGINLASTLOCATION)) gSavedPerAccountSettings.getControl(RLV_SETTING_LOGINLASTLOCATION)->setHiddenFromSettingsEditor(true); -#endif // RLV_EXTENSION_STARTLOCATION if (gSavedSettings.controlExists(RLV_SETTING_TOPLEVELMENU)) gSavedSettings.getControl(RLV_SETTING_TOPLEVELMENU)->getSignal()->connect(boost::bind(&onChangedMenuLevel)); @@ -109,21 +107,19 @@ void RlvSettings::initClass() } } -#ifdef RLV_EXTENSION_STARTLOCATION - // Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-0.2.1d - void RlvSettings::updateLoginLastLocation() +// Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-0.2.1d +void RlvSettings::updateLoginLastLocation() +{ + if ( (!LLApp::isQuitting()) && (gSavedPerAccountSettings.controlExists(RLV_SETTING_LOGINLASTLOCATION)) ) { - if ( (!LLApp::isQuitting()) && (gSavedPerAccountSettings.controlExists(RLV_SETTING_LOGINLASTLOCATION)) ) + BOOL fValue = (gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC)) || (!RlvActions::canStand()); + if (gSavedPerAccountSettings.getBOOL(RLV_SETTING_LOGINLASTLOCATION) != fValue) { - BOOL fValue = (gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC)) || (!RlvActions::canStand()); - if (gSavedPerAccountSettings.getBOOL(RLV_SETTING_LOGINLASTLOCATION) != fValue) - { - gSavedPerAccountSettings.setBOOL(RLV_SETTING_LOGINLASTLOCATION, fValue); - gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE); - } + gSavedPerAccountSettings.setBOOL(RLV_SETTING_LOGINLASTLOCATION, fValue); + gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE); } } -#endif // RLV_EXTENSION_STARTLOCATION +} // Checked: 2011-08-16 (RLVa-1.4.0b) | Added: RLVa-1.4.0b bool RlvSettings::onChangedMenuLevel() diff --git a/indra/newview/rlvcommon.h b/indra/newview/rlvcommon.h index c0f728bc54..dab0f99ba3 100644 --- a/indra/newview/rlvcommon.h +++ b/indra/newview/rlvcommon.h @@ -98,10 +98,8 @@ public: static bool getSharedInvAutoRename() { return rlvGetSetting(RLV_SETTING_SHAREDINVAUTORENAME, true); } static bool getShowNameTags() { return fShowNameTags; } - #ifdef RLV_EXTENSION_STARTLOCATION static bool getLoginLastLocation() { return rlvGetPerUserSetting(RLV_SETTING_LOGINLASTLOCATION, true); } static void updateLoginLastLocation(); - #endif // RLV_EXTENSION_STARTLOCATION static void initClass(); static void onChangedSettingMain(const LLSD& sdValue); diff --git a/indra/newview/rlvdefines.h b/indra/newview/rlvdefines.h index 3e45ff3398..c994206a43 100644 --- a/indra/newview/rlvdefines.h +++ b/indra/newview/rlvdefines.h @@ -17,40 +17,6 @@ #ifndef RLV_DEFINES_H #define RLV_DEFINES_H -// ============================================================================ -// Extensions -// - -// Extensions -#define RLV_EXTENSION_CMD_GETSETDEBUG_EX // Extends the debug variables accessible through @getdebug_xxx/@setdebug_xxx -#define RLV_EXTENSION_CMD_FINDFOLDERS // @findfolders: