diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 9c0628b59815700c03cb5cf0ddbecceb32122d5f..100db8e9e8b5c6746aa4201eb8a160f5c994527c 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 6bf891e50a28f2ab9d180c5cc06379eb7bbad330..69a3a5bcb12ca1b18829d0318498a098a5773c32 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 6f9dfc4c01fc7e28b224dba582f8cbc6c3fbb247..9b6aa0e1bb5023e2f412c6a0d87e38afa52a818e 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 fd8134b168c7df8a8043a24a6fca7d6d53adaa12..aaa5952ef7730ecb2c9e8c8d2162adadd9ab5ce7 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 33ec3a26b7a7b2d88860356a62df47552fc026ed..f6be12747c5b7e71b6b2c1276030004b51fab810 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 9d2810cb37b06d9356df9f46780aba2051dd6583..1058c3836cbf1fa5b589dc550c3ae877fadb65e9 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 dc16aea84d6f79a0e00ac834603ffd917a810f5a..379edb19e5e2c070bdd65037a430986612dd4191 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 80be8144920136ac254495816de7f1338f701596..193f28b9d726b486d7eaab19b478aa5edf04a5a2 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 aa94967b5adf4bbaa1dacb62bb40289fc3605b7a..f6c6b98e3f7636b3690a3a60470a286d38531fd1 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 f4340d87267611f3e598b8a6c6e31d2641acf767..532d902e5c39e8a22b622f777312a40846718863 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 d52bbf08192f28481bc584f328ce7660a7dab67a..d83b2e800f6228f098c697fdd6f15c8736131efc 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 8c4f8abd045f62ef60a85838479f120d4977fb04..dc035026e3c69e16c2da24c1a58411cd039c9988 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 b97e060de3d15cd09b5df72f39e92a8076265250..cf0ef6744f0dd60185bfeb2fb8f7eda5e3ddadc2 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 fbc8ab12ba764c3084bbe9c40c3c4b60d6d601a3..4cf02caf7c0edc3f53c10a0cd7af2e7bdd963992 100644 --- a/indra/newview/rlvactions.h +++ b/indra/newview/rlvactions.h @@ -40,9 +40,9 @@ class RlvActions 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 e37216403c369555ca13bc197a07242ccb350c35..ae8d1e380c34eed2355fe05da7305cdf84706ef8 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 c0f728bc54f912c474e3e7283781276e4bcc9c9c..dab0f99ba38ded508b2cac8072046aba6c947860 100644 --- a/indra/newview/rlvcommon.h +++ b/indra/newview/rlvcommon.h @@ -98,10 +98,8 @@ class RlvSettings static bool getSharedInvAutoRename() { return rlvGetSetting<bool>(RLV_SETTING_SHAREDINVAUTORENAME, true); } static bool getShowNameTags() { return fShowNameTags; } - #ifdef RLV_EXTENSION_STARTLOCATION static bool getLoginLastLocation() { return rlvGetPerUserSetting<bool>(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 3e45ff33985a3111d9cb0024b7126f5551914a25..c994206a436d57ff541efb745048c9b012622cdf 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:<option>=<channel> - @findfolder with multiple results -#define RLV_EXTENSION_FORCEWEAR_GESTURES // @attach*/detach* commands also (de)activate gestures -#define RLV_EXTENSION_STARTLOCATION // Reenables "Start Location" at login if not @tploc=n or @unsit=n restricted at last logoff -#define RLV_EXPERIMENTAL // Enables/disables experimental features en masse -#define RLV_EXPERIMENTAL_CMDS // Enables/disables experimental commands en masse - -// Experimental features -#ifdef RLV_EXPERIMENTAL - // Stable (will mature to RLV_EXTENSION_XXX in next release if no bugs are found) - - // Under testing (stable, but requires further testing - safe for public release but may be quirky) - #define RLV_EXTENSION_FORCEWEAR_FOLDERLINKS // @attach*/detach* commands will collect from folder links as well - - // Under development (don't include in public release) - #if LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG -// #define RLV_EXPERIMENTAL_COMPOSITEFOLDERS - #endif // LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG -#endif // RLV_EXPERIMENTAL - -// Experimental commands (not part of the RLV API spec, disabled on public releases) -#ifdef RLV_EXPERIMENTAL_CMDS - #define RLV_EXTENSION_CMD_ALLOWIDLE // Forces "Away" status when idle (effect is the same as setting AllowIdleAFK to TRUE) - #define RLV_EXTENSION_CMD_GETCOMMAND // @getcommand:<option>=<channel> - #define RLV_EXTENSION_CMD_GETXXXNAMES // @get[add|rem]attachnames:<option>=<channel> and @get[add|rem]outfitnames=<channel> - #define RLV_EXTENSION_CMD_INTERACT // @interact=n - #define RLV_EXTENSION_CMD_TOUCHXXX // @touch:uuid=n|y, @touchworld[:<uuid>]=n|y, @touchattach[:<uuid>]=n|y, @touchud[:<uuid>]=n|y -#endif // RLV_EXPERIMENTAL_CMDS - // ============================================================================ // Defines // diff --git a/indra/newview/rlvextensions.cpp b/indra/newview/rlvextensions.cpp index 0e4ed9ae51c34cbde160f059eafd9b2d572942df..d62b353c065eb3666985f40c0ec9addf1af36831 100644 --- a/indra/newview/rlvextensions.cpp +++ b/indra/newview/rlvextensions.cpp @@ -385,11 +385,9 @@ RlvExtGetSet::RlvExtGetSet() { m_DbgAllowed.insert(std::pair<std::string, S16>("AvatarSex", DBG_READ | DBG_WRITE | DBG_PSEUDO)); m_DbgAllowed.insert(std::pair<std::string, S16>("RenderResolutionDivisor", DBG_READ | DBG_WRITE)); - #ifdef RLV_EXTENSION_CMD_GETSETDEBUG_EX - m_DbgAllowed.insert(std::pair<std::string, S16>(RLV_SETTING_FORBIDGIVETORLV, DBG_READ)); - m_DbgAllowed.insert(std::pair<std::string, S16>(RLV_SETTING_NOSETENV, DBG_READ)); - m_DbgAllowed.insert(std::pair<std::string, S16>("WindLightUseAtmosShaders", DBG_READ)); - #endif // RLV_EXTENSION_CMD_GETSETDEBUG_EX + m_DbgAllowed.insert(std::pair<std::string, S16>(RLV_SETTING_FORBIDGIVETORLV, DBG_READ)); + m_DbgAllowed.insert(std::pair<std::string, S16>(RLV_SETTING_NOSETENV, DBG_READ)); + m_DbgAllowed.insert(std::pair<std::string, S16>("WindLightUseAtmosShaders", DBG_READ)); // Cache persistance of every setting LLControlVariable* pSetting; diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp index 0715f488629c8ceb941f45b8d9b0d16fb2f5fe26..7ecaf183546ecd30001b45863f311fcdbc4396e1 100644 --- a/indra/newview/rlvhandler.cpp +++ b/indra/newview/rlvhandler.cpp @@ -474,12 +474,10 @@ bool RlvHandler::handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& // Checked: 2010-08-29 (RLVa-1.2.1c) | Modified: RLVa-1.2.1c void RlvHandler::onSitOrStand(bool fSitting) { - #ifdef RLV_EXTENSION_STARTLOCATION if (rlv_handler_t::isEnabled()) { RlvSettings::updateLoginLastLocation(); } - #endif // RLV_EXTENSION_STARTLOCATION if ( (hasBehaviour(RLV_BHVR_STANDTP)) && (!fSitting) && (!m_posSitSource.isExactlyZero()) ) { @@ -668,10 +666,7 @@ void RlvHandler::onLoginComplete() { RlvInventory::instance().fetchWornItems(); RlvInventory::instance().fetchSharedInventory(); - - #ifdef RLV_EXTENSION_STARTLOCATION RlvSettings::updateLoginLastLocation(); - #endif // RLV_EXTENSION_STARTLOCATION LLViewerParcelMgr::getInstance()->setTeleportFailedCallback(boost::bind(&RlvHandler::onTeleportFailed, this)); LLViewerParcelMgr::getInstance()->setTeleportFinishedCallback(boost::bind(&RlvHandler::onTeleportFinished, this, _1)); @@ -739,13 +734,11 @@ bool RlvHandler::canTouch(const LLViewerObject* pObj, const LLVector3& posOffset ((!hasBehaviour(RLV_BHVR_TOUCHATTACH)) || (isException(RLV_BHVR_TOUCHATTACH, idRoot, RLV_CHECK_PERMISSIVE))) && ((!hasBehaviour(RLV_BHVR_TOUCHATTACHSELF)) || (isException(RLV_BHVR_TOUCHATTACH, idRoot, RLV_CHECK_PERMISSIVE))); } -#ifdef RLV_EXTENSION_CMD_TOUCHXXX else { // HUD attachment fCanTouch = (!hasBehaviour(RLV_BHVR_TOUCHHUD)) || (isException(RLV_BHVR_TOUCHHUD, idRoot, RLV_CHECK_PERMISSIVE)); } -#endif // RLV_EXTENSION_CMD_TOUCHXXX } if ( (!fCanTouch) && (hasBehaviour(RLV_BHVR_TOUCHME)) ) fCanTouch = hasBehaviourRoot(idRoot, RLV_BHVR_TOUCHME); @@ -1849,27 +1842,21 @@ ERlvCmdRet RlvHandler::processReplyCommand(const RlvCommand& rlvCmd) const case RLV_BHVR_GETATTACH: // @getattach[:<layer>]=<channel> eRet = onGetAttach(rlvCmd, strReply); break; -#ifdef RLV_EXTENSION_CMD_GETXXXNAMES case RLV_BHVR_GETATTACHNAMES: // @getattachnames[:<grp>]=<channel> case RLV_BHVR_GETADDATTACHNAMES:// @getaddattachnames[:<grp>]=<channel> case RLV_BHVR_GETREMATTACHNAMES:// @getremattachnames[:<grp>]=<channel> eRet = onGetAttachNames(rlvCmd, strReply); break; -#endif // RLV_EXTENSION_CMD_GETXXXNAMES case RLV_BHVR_GETOUTFIT: // @getoutfit[:<layer>]=<channel> eRet = onGetOutfit(rlvCmd, strReply); break; -#ifdef RLV_EXTENSION_CMD_GETXXXNAMES case RLV_BHVR_GETOUTFITNAMES: // @getoutfitnames=<channel> case RLV_BHVR_GETADDOUTFITNAMES:// @getaddoutfitnames=<channel> case RLV_BHVR_GETREMOUTFITNAMES:// @getremoutfitnames=<channel> eRet = onGetOutfitNames(rlvCmd, strReply); break; -#endif // RLV_EXTENSION_CMD_GETXXXNAMES case RLV_BHVR_FINDFOLDER: // @findfolder:<criteria>=<channel> -#ifdef RLV_EXTENSION_CMD_FINDFOLDERS case RLV_BHVR_FINDFOLDERS: // @findfolders:<criteria>=<channel> -#endif // RLV_EXTENSION_CMD_FINDFOLDERS eRet = onFindFolder(rlvCmd, strReply); break; case RLV_BHVR_GETPATH: // @getpath[:<option>]=<channel> @@ -1898,7 +1885,6 @@ ERlvCmdRet RlvHandler::processReplyCommand(const RlvCommand& rlvCmd) const strReply = idSitObj.asString(); } break; -#ifdef RLV_EXTENSION_CMD_GETCOMMAND case RLV_BHVR_GETCOMMAND: // @getcommand:<option>=<channel> - Checked: 2010-12-11 (RLVa-1.2.2c) | Added: RLVa-1.2.2c { std::list<std::string> cmdList; @@ -1907,7 +1893,6 @@ ERlvCmdRet RlvHandler::processReplyCommand(const RlvCommand& rlvCmd) const strReply.append("/").append(*itCmd); } break; -#endif // RLV_EXTENSION_CMD_GETCOMMAND case RLV_BHVR_GETSTATUS: // @getstatus - Checked: 2010-04-07 (RLVa-1.2.0d) | Modified: RLVa-1.1.0f { std::string strFilter, strSeparator; diff --git a/indra/newview/rlvhelper.cpp b/indra/newview/rlvhelper.cpp index ff05df400cb9834f0838ee466ef700d0e9313cd7..1e2ca2c28aa6ea1ab09f35fa803574a6b82e7f10 100644 --- a/indra/newview/rlvhelper.cpp +++ b/indra/newview/rlvhelper.cpp @@ -170,7 +170,7 @@ RlvBehaviourDictionary::RlvBehaviourDictionary() addEntry(new RlvBehaviourInfo("getaddoutfitnames", RLV_BHVR_GETADDOUTFITNAMES, RLV_TYPE_REPLY, RlvBehaviourInfo::BHVR_EXPERIMENTAL)); addEntry(new RlvBehaviourInfo("getattach", RLV_BHVR_GETATTACH, RLV_TYPE_REPLY)); addEntry(new RlvBehaviourInfo("getattachnames", RLV_BHVR_GETATTACHNAMES, RLV_TYPE_REPLY, RlvBehaviourInfo::BHVR_EXPERIMENTAL)); - addEntry(new RlvBehaviourInfo("getcommand", RLV_BHVR_GETCOMMAND, RLV_TYPE_REPLY, RlvBehaviourInfo::BHVR_EXPERIMENTAL)); + addEntry(new RlvBehaviourInfo("getcommand", RLV_BHVR_GETCOMMAND, RLV_TYPE_REPLY, RlvBehaviourInfo::BHVR_EXTENDED)); addEntry(new RlvBehaviourInfo("getgroup", RLV_BHVR_GETGROUP, RLV_TYPE_REPLY)); addEntry(new RlvBehaviourInfo("getinv", RLV_BHVR_GETINV, RLV_TYPE_REPLY)); addEntry(new RlvBehaviourInfo("getinvworn", RLV_BHVR_GETINVWORN, RLV_TYPE_REPLY)); @@ -778,7 +778,6 @@ void RlvForceWear::forceFolder(const LLViewerInventoryCategory* pFolder, EWearAc } break; - #ifdef RLV_EXTENSION_FORCEWEAR_GESTURES case LLAssetType::AT_GESTURE: if (isWearAction(eAction)) { @@ -791,7 +790,6 @@ void RlvForceWear::forceFolder(const LLViewerInventoryCategory* pFolder, EWearAc m_remGestures.push_back(pRlvItem); } break; - #endif // RLV_EXTENSION_FORCEWEAR_GESTURES default: break; diff --git a/indra/newview/rlvinventory.cpp b/indra/newview/rlvinventory.cpp index ce9f35ce543142eadc7a0b989f14e9f8cf9dab21..180ddecd020a1de75f347b28e681907d3df29363 100644 --- a/indra/newview/rlvinventory.cpp +++ b/indra/newview/rlvinventory.cpp @@ -809,12 +809,9 @@ bool RlvWearableItemCollector::onCollectItem(const LLInventoryItem* pItem) (m_Folded.end() != std::find(m_Folded.begin(), m_Folded.end(), idParent)) ) && ( (!fAttach) || (RlvAttachPtLookup::hasAttachPointName(pItem)) || (RlvSettings::getEnableSharedWear()) ); break; - #ifdef RLV_EXTENSION_FORCEWEAR_GESTURES case LLAssetType::AT_GESTURE: fRet = (m_Wearable.end() != std::find(m_Wearable.begin(), m_Wearable.end(), idParent)); break; - #endif // RLV_EXTENSION_FORCEWEAR_GESTURES - #ifdef RLV_EXTENSION_FORCEWEAR_FOLDERLINKS case LLAssetType::AT_CATEGORY: if (LLAssetType::AT_LINK_FOLDER == pItem->getActualType()) { @@ -831,7 +828,6 @@ bool RlvWearableItemCollector::onCollectItem(const LLInventoryItem* pItem) } } break; - #endif // RLV_EXTENSION_FORCEWEAR_FOLDERLINKS default: break; } diff --git a/indra/newview/rlvui.cpp b/indra/newview/rlvui.cpp index 4bd465ef9d72f79047fc76ea40f7b26a41da1e17..ff44862740c932f3837cc090c8b9acf884ef8c80 100644 --- a/indra/newview/rlvui.cpp +++ b/indra/newview/rlvui.cpp @@ -85,10 +85,8 @@ RlvUIEnabler::RlvUIEnabler() m_Handlers.insert(std::pair<ERlvBehaviour, behaviour_handler_t>(RLV_BHVR_TPLM, boost::bind(&RlvUIEnabler::onToggleTp, this))); // onUpdateLoginLastLocation - #ifdef RLV_EXTENSION_STARTLOCATION m_Handlers.insert(std::pair<ERlvBehaviour, behaviour_handler_t>(RLV_BHVR_TPLOC, boost::bind(&RlvUIEnabler::onUpdateLoginLastLocation, this, _1))); m_Handlers.insert(std::pair<ERlvBehaviour, behaviour_handler_t>(RLV_BHVR_UNSIT, boost::bind(&RlvUIEnabler::onUpdateLoginLastLocation, this, _1))); - #endif // RLV_EXTENSION_STARTLOCATION } // Checked: 2010-02-28 (RLVa-1.4.0a) | Added: RLVa-1.2.0a