RLVa update

This commit is contained in:
Lirusaito
2013-06-01 02:49:21 -04:00
parent a06a6f4624
commit e27914a57e
5 changed files with 52 additions and 87 deletions

View File

@@ -495,10 +495,6 @@ bool RlvExtGetSet::findDebugSetting(std::string& strSetting, S16& flags)
{ {
LLStringUtil::toLower(strSetting); // Convenience for non-RLV calls LLStringUtil::toLower(strSetting); // Convenience for non-RLV calls
// HACK-RLVa: bad code but it's just a temporary measure to provide a smooth changeover from the old to the new rebranded settings
if ( (strSetting.length() >= 14) && (0 == strSetting.find("restrainedlife")) )
strSetting = "restrainedlove" + strSetting.substr(14);
std::string strTemp; std::string strTemp;
for (std::map<std::string, S16>::const_iterator itSetting = m_DbgAllowed.begin(); itSetting != m_DbgAllowed.end(); ++itSetting) for (std::map<std::string, S16>::const_iterator itSetting = m_DbgAllowed.begin(); itSetting != m_DbgAllowed.end(); ++itSetting)
{ {

View File

@@ -18,9 +18,9 @@
#include "llagent.h" #include "llagent.h"
#include "llappearancemgr.h" #include "llappearancemgr.h"
#include "llappviewer.h" #include "llappviewer.h"
#include "llgroupactions.h"
#include "llhudtext.h" #include "llhudtext.h"
#include "llstartup.h" #include "llstartup.h"
#include "llviewermenu.h"
#include "llviewermessage.h" #include "llviewermessage.h"
#include "llviewerobjectlist.h" #include "llviewerobjectlist.h"
#include "llviewerparcelmgr.h" #include "llviewerparcelmgr.h"
@@ -195,7 +195,7 @@ void RlvHandler::removeCommandHandler(RlvCommandHandler* pCmdHandler)
m_CommandHandlers.remove(pCmdHandler); m_CommandHandlers.remove(pCmdHandler);
} }
// Checked: 2009-10-26 (RLVa-1.1.0a) | Modified: RLVa-1.1.0a // Checked: 2010-04-07 (RLVa-1.2.0d) | Modified: RLVa-1.1.0a
void RlvHandler::clearCommandHandlers() void RlvHandler::clearCommandHandlers()
{ {
std::list<RlvCommandHandler*>::const_iterator itHandler = m_CommandHandlers.begin(); std::list<RlvCommandHandler*>::const_iterator itHandler = m_CommandHandlers.begin();
@@ -730,7 +730,6 @@ size_t utf8str_strlen(const std::string& utf8)
return length; return length;
} }
// TODO-RLV: works, but more testing won't hurt
std::string utf8str_chtruncate(const std::string& utf8, size_t length) std::string utf8str_chtruncate(const std::string& utf8, size_t length)
{ {
if (0 == length) if (0 == length)
@@ -1113,7 +1112,7 @@ void RlvHandler::clearState()
#define VERIFY_OPTION(x) { if (!(x)) { eRet = RLV_RET_FAILED_OPTION; break; } } #define VERIFY_OPTION(x) { if (!(x)) { eRet = RLV_RET_FAILED_OPTION; break; } }
#define VERIFY_OPTION_REF(x) { if (!(x)) { eRet = RLV_RET_FAILED_OPTION; break; } fRefCount = true; } #define VERIFY_OPTION_REF(x) { if (!(x)) { eRet = RLV_RET_FAILED_OPTION; break; } fRefCount = true; }
// Checked: 2010-03-03 (RLVa-1.1.3b) | Modified: RLVa-1.2.0a // Checked: 2010-03-03 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a
ERlvCmdRet RlvHandler::processAddRemCommand(const RlvCommand& rlvCmd) ERlvCmdRet RlvHandler::processAddRemCommand(const RlvCommand& rlvCmd)
{ {
// NOTE: - at this point the command has already been: // NOTE: - at this point the command has already been:
@@ -1154,8 +1153,8 @@ ERlvCmdRet RlvHandler::processAddRemCommand(const RlvCommand& rlvCmd)
VERIFY_OPTION_REF(strOption.empty()); VERIFY_OPTION_REF(strOption.empty());
} }
break; break;
case RLV_BHVR_ADDOUTFIT: // @addoutfit[:<layer>]=n|y - Checked: 2010-08-29 (RLVa-1.1.3b) | Modified: RLVa-1.2.1c case RLV_BHVR_ADDOUTFIT: // @addoutfit[:<layer>]=n|y - Checked: 2010-08-29 (RLVa-1.2.1c) | Modified: RLVa-1.2.1c
case RLV_BHVR_REMOUTFIT: // @remoutfit[:<layer>]=n|y - Checked: 2010-08-29 (RLVa-1.1.3b) | Modified: RLVa-1.2.1c case RLV_BHVR_REMOUTFIT: // @remoutfit[:<layer>]=n|y - Checked: 2010-08-29 (RLVa-1.2.1c) | Modified: RLVa-1.2.1c
{ {
// If there's an option it should specify a wearable type name (reference count on no option *and* a valid option) // If there's an option it should specify a wearable type name (reference count on no option *and* a valid option)
RlvCommandOptionGeneric rlvCmdOption(rlvCmd.getOption()); RlvCommandOptionGeneric rlvCmdOption(rlvCmd.getOption());
@@ -1244,7 +1243,7 @@ ERlvCmdRet RlvHandler::processAddRemCommand(const RlvCommand& rlvCmd)
VERIFY_OPTION_REF(strOption.empty()); VERIFY_OPTION_REF(strOption.empty());
} }
break; break;
case RLV_BHVR_NOTIFY: // @notify:<params>=add|rem - Checked: 2010-03-03 (RLVa-1.1.3a) | Modified: RLVa-1.2.0a case RLV_BHVR_NOTIFY: // @notify:<params>=add|rem - Checked: 2010-03-03 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a
{ {
// There should be an option that we can successfully parse (if there's an empty option the command is invalid) // There should be an option that we can successfully parse (if there's an empty option the command is invalid)
S32 nChannel; std::string strFilter; S32 nChannel; std::string strFilter;
@@ -1277,10 +1276,10 @@ ERlvCmdRet RlvHandler::processAddRemCommand(const RlvCommand& rlvCmd)
case RLV_BHVR_SHOWLOC: // @showloc=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h case RLV_BHVR_SHOWLOC: // @showloc=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
case RLV_BHVR_SHOWNAMES: // @shownames=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h case RLV_BHVR_SHOWNAMES: // @shownames=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
case RLV_BHVR_EMOTE: // @emote=n|y - Checked: 2010-03-26 (RLVa-1.2.0b) case RLV_BHVR_EMOTE: // @emote=n|y - Checked: 2010-03-26 (RLVa-1.2.0b)
case RLV_BHVR_SENDCHAT: // @sendchat=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h case RLV_BHVR_SENDCHAT: // @sendchat=n|y - Checked: 2010-03-26 (RLVa-1.2.0b)
case RLV_BHVR_CHATWHISPER: // @chatwhisper=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h case RLV_BHVR_CHATWHISPER: // @chatwhisper=n|y - Checked: 2010-03-26 (RLVa-1.2.0b)
case RLV_BHVR_CHATNORMAL: // @chatnormal=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h case RLV_BHVR_CHATNORMAL: // @chatnormal=n|y - Checked: 2010-03-26 (RLVa-1.2.0b)
case RLV_BHVR_CHATSHOUT: // @chatshout=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h case RLV_BHVR_CHATSHOUT: // @chatshout=n|y - Checked: 2010-03-26 (RLVa-1.2.0b)
case RLV_BHVR_PERMISSIVE: // @permissive=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h case RLV_BHVR_PERMISSIVE: // @permissive=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
case RLV_BHVR_SHOWINV: // @showinv=n|y - Checked: 2010-03-01 (RLVa-1.2.0a) case RLV_BHVR_SHOWINV: // @showinv=n|y - Checked: 2010-03-01 (RLVa-1.2.0a)
case RLV_BHVR_SHOWMINIMAP: // @showminimap=n|y - Checked: 2010-02-28 (RLVa-1.2.0a) case RLV_BHVR_SHOWMINIMAP: // @showminimap=n|y - Checked: 2010-02-28 (RLVa-1.2.0a)
@@ -1291,12 +1290,12 @@ ERlvCmdRet RlvHandler::processAddRemCommand(const RlvCommand& rlvCmd)
case RLV_BHVR_STANDTP: // @standtp=n|y - Checked: 2010-08-29 (RLVa-1.2.1c) case RLV_BHVR_STANDTP: // @standtp=n|y - Checked: 2010-08-29 (RLVa-1.2.1c)
case RLV_BHVR_TPLM: // @tplm=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h case RLV_BHVR_TPLM: // @tplm=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
case RLV_BHVR_TPLOC: // @tploc=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h case RLV_BHVR_TPLOC: // @tploc=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
case RLV_BHVR_VIEWNOTE: // @viewnote=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h case RLV_BHVR_VIEWNOTE: // @viewnote=n|y - Checked: 2010-03-27 (RLVa-1.2.0b)
case RLV_BHVR_VIEWSCRIPT: // @viewscript=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h case RLV_BHVR_VIEWSCRIPT: // @viewscript=n|y - Checked: 2010-03-27 (RLVa-1.2.0b)
case RLV_BHVR_VIEWTEXTURE: // @viewtexture=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h case RLV_BHVR_VIEWTEXTURE: // @viewtexture=n|y - Checked: 2010-03-27 (RLVa-1.2.0b)
case RLV_BHVR_ACCEPTPERMISSION: // @acceptpermission=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h case RLV_BHVR_ACCEPTPERMISSION: // @acceptpermission=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
#ifdef RLV_EXTENSION_CMD_ALLOWIDLE #ifdef RLV_EXTENSION_CMD_ALLOWIDLE
case RLV_BHVR_ALLOWIDLE: // @allowidle=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h case RLV_BHVR_ALLOWIDLE: // @allowidle=n|y - Checked: 2010-05-03 (RLVa-1.2.0g) | Modified: RLVa-1.1.0h
#endif // RLV_EXTENSION_CMD_ALLOWIDLE #endif // RLV_EXTENSION_CMD_ALLOWIDLE
case RLV_BHVR_REZ: // @rez=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h case RLV_BHVR_REZ: // @rez=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
case RLV_BHVR_FARTOUCH: // @fartouch=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h case RLV_BHVR_FARTOUCH: // @fartouch=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
@@ -1318,8 +1317,8 @@ ERlvCmdRet RlvHandler::processAddRemCommand(const RlvCommand& rlvCmd)
VERIFY_OPTION_REF(strOption.empty()); VERIFY_OPTION_REF(strOption.empty());
break; break;
// The following block is only valid if there's no option (= restriction) or if it specifies a valid UUID (= behaviour exception) // The following block is only valid if there's no option (= restriction) or if it specifies a valid UUID (= behaviour exception)
case RLV_BHVR_RECVCHAT: // @recvchat[:<uuid>]=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h case RLV_BHVR_RECVCHAT: // @recvchat[:<uuid>]=n|y - Checked: 2010-03-26 (RLVa-1.2.0b)
case RLV_BHVR_RECVEMOTE: // @recvemote[:<uuid>]=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h case RLV_BHVR_RECVEMOTE: // @recvemote[:<uuid>]=n|y - Checked: 2010-03-26 (RLVa-1.2.0b)
case RLV_BHVR_SENDIM: // @sendim[:<uuid>]=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h case RLV_BHVR_SENDIM: // @sendim[:<uuid>]=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
case RLV_BHVR_RECVIM: // @recvim[:<uuid>]=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h case RLV_BHVR_RECVIM: // @recvim[:<uuid>]=n|y - Checked: 2009-12-05 (RLVa-1.1.0h) | Modified: RLVa-1.1.0h
case RLV_BHVR_STARTIM: // @startim[:<uuid>]=n|y - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h case RLV_BHVR_STARTIM: // @startim[:<uuid>]=n|y - Checked: 2011-04-11 (RLVa-1.3.0h) | Added: RLVa-1.3.0h
@@ -1401,7 +1400,7 @@ ERlvCmdRet RlvHandler::processAddRemCommand(const RlvCommand& rlvCmd)
return eRet; return eRet;
} }
// Checked: 2010-03-03 (RLVa-1.1.3b) | Modified: RLVa-1.2.0a // Checked: 2010-03-03 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a
ERlvCmdRet RlvHandler::onAddRemAttach(const RlvCommand& rlvCmd, bool& fRefCount) ERlvCmdRet RlvHandler::onAddRemAttach(const RlvCommand& rlvCmd, bool& fRefCount)
{ {
RLV_ASSERT( (RLV_TYPE_ADD == rlvCmd.getParamType()) || (RLV_TYPE_REMOVE == rlvCmd.getParamType()) ); RLV_ASSERT( (RLV_TYPE_ADD == rlvCmd.getParamType()) || (RLV_TYPE_REMOVE == rlvCmd.getParamType()) );
@@ -1436,7 +1435,7 @@ ERlvCmdRet RlvHandler::onAddRemAttach(const RlvCommand& rlvCmd, bool& fRefCount)
return RLV_RET_SUCCESS; return RLV_RET_SUCCESS;
} }
// Checked: 2010-02-28 (RLVa-1.1.3b) | Modified: RLVa-1.2.0a // Checked: 2010-02-28 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a
ERlvCmdRet RlvHandler::onAddRemDetach(const RlvCommand& rlvCmd, bool& fRefCount) ERlvCmdRet RlvHandler::onAddRemDetach(const RlvCommand& rlvCmd, bool& fRefCount)
{ {
RLV_ASSERT( (RLV_TYPE_ADD == rlvCmd.getParamType()) || (RLV_TYPE_REMOVE == rlvCmd.getParamType()) ); RLV_ASSERT( (RLV_TYPE_ADD == rlvCmd.getParamType()) || (RLV_TYPE_REMOVE == rlvCmd.getParamType()) );
@@ -1610,7 +1609,10 @@ ERlvCmdRet RlvHandler::processForceCommand(const RlvCommand& rlvCmd) const
{ {
F32 nValue = (rlvCmdOption.m_nPelvisToFoot - gAgentAvatarp->getPelvisToFoot()) * rlvCmdOption.m_nPelvisToFootDeltaMult; F32 nValue = (rlvCmdOption.m_nPelvisToFoot - gAgentAvatarp->getPelvisToFoot()) * rlvCmdOption.m_nPelvisToFootDeltaMult;
nValue += rlvCmdOption.m_nPelvisToFootOffset; nValue += rlvCmdOption.m_nPelvisToFootOffset;
if (!gAgentAvatarp->isUsingServerBakes())
gSavedSettings.setF32(RLV_SETTING_AVATAROFFSET_Z, llclamp<F32>(nValue, -1.0f, 1.0f)); gSavedSettings.setF32(RLV_SETTING_AVATAROFFSET_Z, llclamp<F32>(nValue, -1.0f, 1.0f));
else
eRet = RLV_RET_FAILED_DISABLED;
} }
} }
break; break;
@@ -1667,7 +1669,7 @@ ERlvCmdRet RlvHandler::processForceCommand(const RlvCommand& rlvCmd) const
return eRet; return eRet;
} }
// Checked: 2010-08-29 (RLVa-1.1.3b) | Modified: RLVa-1.2.1c // Checked: 2010-08-29 (RLVa-1.2.1c) | Modified: RLVa-1.2.1c
ERlvCmdRet RlvHandler::onForceRemAttach(const RlvCommand& rlvCmd) const ERlvCmdRet RlvHandler::onForceRemAttach(const RlvCommand& rlvCmd) const
{ {
RLV_ASSERT(RLV_TYPE_FORCE == rlvCmd.getParamType()); RLV_ASSERT(RLV_TYPE_FORCE == rlvCmd.getParamType());
@@ -1702,7 +1704,7 @@ ERlvCmdRet RlvHandler::onForceRemAttach(const RlvCommand& rlvCmd) const
return RLV_RET_FAILED_OPTION; return RLV_RET_FAILED_OPTION;
} }
// Checked: 2010-08-29 (RLVa-1.1.3b) | Modified: RLVa-1.2.1c // Checked: 2010-08-29 (RLVa-1.2.1c) | Modified: RLVa-1.2.1c
ERlvCmdRet RlvHandler::onForceRemOutfit(const RlvCommand& rlvCmd) const ERlvCmdRet RlvHandler::onForceRemOutfit(const RlvCommand& rlvCmd) const
{ {
RlvCommandOptionGeneric rlvCmdOption(rlvCmd.getOption()); RlvCommandOptionGeneric rlvCmdOption(rlvCmd.getOption());
@@ -1741,14 +1743,7 @@ ERlvCmdRet RlvHandler::onForceGroup(const RlvCommand& rlvCmd) const
if (fValid) if (fValid)
{ {
m_idAgentGroup = idGroup; m_idAgentGroup = idGroup;
LLGroupActions::activate(idGroup);
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_ActivateGroup);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->addUUIDFast(_PREHASH_GroupID, idGroup);
gAgent.sendReliableMessage();
} }
return (fValid) ? RLV_RET_SUCCESS : RLV_RET_FAILED_OPTION; return (fValid) ? RLV_RET_SUCCESS : RLV_RET_FAILED_OPTION;
@@ -1833,7 +1828,7 @@ void RlvHandler::onForceWearCallback(const uuid_vec_t& idItems, ERlvBehaviour eB
// Command handlers (RLV_TYPE_REPLY) // Command handlers (RLV_TYPE_REPLY)
// //
// Checked: 2009-11-26 (RLVa-1.1.0f) | Modified: RLVa-1.1.0f // Checked: 2010-04-07 (RLVa-1.2.0d) | Modified: RLVa-1.1.0f
ERlvCmdRet RlvHandler::processReplyCommand(const RlvCommand& rlvCmd) const ERlvCmdRet RlvHandler::processReplyCommand(const RlvCommand& rlvCmd) const
{ {
RLV_ASSERT(RLV_TYPE_REPLY == rlvCmd.getParamType()); RLV_ASSERT(RLV_TYPE_REPLY == rlvCmd.getParamType());
@@ -1846,12 +1841,12 @@ ERlvCmdRet RlvHandler::processReplyCommand(const RlvCommand& rlvCmd) const
ERlvCmdRet eRet = RLV_RET_SUCCESS; std::string strReply; ERlvCmdRet eRet = RLV_RET_SUCCESS; std::string strReply;
switch (rlvCmd.getBehaviourType()) switch (rlvCmd.getBehaviourType())
{ {
case RLV_BHVR_VERSION: // @version=<channel> - Checked: 2010-03-27 (RLVa-1.2.0b) case RLV_BHVR_VERSION: // @version=<channel> - Checked: 2010-03-27 (RLVa-1.4.0a)
case RLV_BHVR_VERSIONNEW: // @versionnew=<channel> - Checked: 2010-03-27 (RLVa-1.2.0b) | Added: RLVa-1.2.0b case RLV_BHVR_VERSIONNEW: // @versionnew=<channel> - Checked: 2010-03-27 (RLVa-1.4.0a) | Added: RLVa-1.2.0b
// NOTE: RLV will respond even if there's an option // NOTE: RLV will respond even if there's an option
strReply = RlvStrings::getVersion(RLV_BHVR_VERSION == rlvCmd.getBehaviourType()); strReply = RlvStrings::getVersion(RLV_BHVR_VERSION == rlvCmd.getBehaviourType());
break; break;
case RLV_BHVR_VERSIONNUM: // @versionnum=<channel> - Checked: 2009-11-26 (RLVa-1.1.0f) | Added: RLVa-1.0.4b case RLV_BHVR_VERSIONNUM: // @versionnum=<channel> - Checked: 2010-03-27 (RLVa-1.4.0a) | Added: RLVa-1.0.4b
// NOTE: RLV will respond even if there's an option // NOTE: RLV will respond even if there's an option
strReply = RlvStrings::getVersionNum(); strReply = RlvStrings::getVersionNum();
break; break;
@@ -1888,7 +1883,7 @@ ERlvCmdRet RlvHandler::processReplyCommand(const RlvCommand& rlvCmd) const
case RLV_BHVR_GETINV: // @getinv[:<path>]=<channel> case RLV_BHVR_GETINV: // @getinv[:<path>]=<channel>
eRet = onGetInv(rlvCmd, strReply); eRet = onGetInv(rlvCmd, strReply);
break; break;
case RLV_BHVR_GETINVWORN: // @getinvworn[:path]=<channel> case RLV_BHVR_GETINVWORN: // @getinvworn[:<path>]=<channel>
eRet = onGetInvWorn(rlvCmd, strReply); eRet = onGetInvWorn(rlvCmd, strReply);
break; break;
case RLV_BHVR_GETGROUP: // @getgroup=<channel> - Checked: 2011-03-28 (RLVa-1.4.1a) | Added: RLVa-1.3.0f case RLV_BHVR_GETGROUP: // @getgroup=<channel> - Checked: 2011-03-28 (RLVa-1.4.1a) | Added: RLVa-1.3.0f
@@ -1917,7 +1912,7 @@ ERlvCmdRet RlvHandler::processReplyCommand(const RlvCommand& rlvCmd) const
} }
break; break;
#endif // RLV_EXTENSION_CMD_GETCOMMAND #endif // RLV_EXTENSION_CMD_GETCOMMAND
case RLV_BHVR_GETSTATUS: // @getstatus[:<option>]=<channel> - Checked: 2009-11-26 (RLVa-1.1.0f) | Modified: RLVa-1.1.0f case RLV_BHVR_GETSTATUS: // @getstatus[:<option>]=<channel> - Checked: 2010-04-07 (RLVa-1.2.0d) | Modified: RLVa-1.1.0f
{ {
// NOTE: specification says response should start with '/' but RLV-1.16.1 returns an empty string when no rules are set // NOTE: specification says response should start with '/' but RLV-1.16.1 returns an empty string when no rules are set
rlv_object_map_t::const_iterator itObj = m_Objects.find(rlvCmd.getObjectID()); rlv_object_map_t::const_iterator itObj = m_Objects.find(rlvCmd.getObjectID());
@@ -1925,7 +1920,7 @@ ERlvCmdRet RlvHandler::processReplyCommand(const RlvCommand& rlvCmd) const
strReply = itObj->second.getStatusString(rlvCmd.getOption()); strReply = itObj->second.getStatusString(rlvCmd.getOption());
} }
break; break;
case RLV_BHVR_GETSTATUSALL: // @getstatusall[:<option>]=<channel> - Checked: 2009-11-26 (RLVa-1.1.0f) | Modified: RLVa-1.1.0f case RLV_BHVR_GETSTATUSALL: // @getstatusall[:<option>]=<channel> - Checked: 2010-04-07 (RLVa-1.2.0d) | Modified: RLVa-1.1.0f
{ {
// NOTE: specification says response should start with '/' but RLV-1.16.1 returns an empty string when no rules are set // NOTE: specification says response should start with '/' but RLV-1.16.1 returns an empty string when no rules are set
for (rlv_object_map_t::const_iterator itObj = m_Objects.begin(); itObj != m_Objects.end(); ++itObj) for (rlv_object_map_t::const_iterator itObj = m_Objects.begin(); itObj != m_Objects.end(); ++itObj)
@@ -1948,7 +1943,7 @@ ERlvCmdRet RlvHandler::processReplyCommand(const RlvCommand& rlvCmd) const
return eRet; return eRet;
} }
// Checked: 2010-04-07 (RLVa-1.1.3a) | Modified: RLVa-1.1.0f // Checked: 2010-04-07 (RLVa-1.2.0d) | Modified: RLVa-1.1.0f
ERlvCmdRet RlvHandler::onFindFolder(const RlvCommand& rlvCmd, std::string& strReply) const ERlvCmdRet RlvHandler::onFindFolder(const RlvCommand& rlvCmd, std::string& strReply) const
{ {
RLV_ASSERT(RLV_TYPE_REPLY == rlvCmd.getParamType()); RLV_ASSERT(RLV_TYPE_REPLY == rlvCmd.getParamType());
@@ -1991,7 +1986,7 @@ ERlvCmdRet RlvHandler::onFindFolder(const RlvCommand& rlvCmd, std::string& strRe
return RLV_RET_SUCCESS; return RLV_RET_SUCCESS;
} }
// Checked: 2010-03-19 (RLVa-1.1.3b) | Modified: RLVa-1.1.0e // Checked: 2010-03-19 (RLVa-1.4.0a) | Modified: RLVa-1.1.0e
ERlvCmdRet RlvHandler::onGetAttach(const RlvCommand& rlvCmd, std::string& strReply) const ERlvCmdRet RlvHandler::onGetAttach(const RlvCommand& rlvCmd, std::string& strReply) const
{ {
RLV_ASSERT(RLV_TYPE_REPLY == rlvCmd.getParamType()); RLV_ASSERT(RLV_TYPE_REPLY == rlvCmd.getParamType());
@@ -2023,7 +2018,7 @@ ERlvCmdRet RlvHandler::onGetAttach(const RlvCommand& rlvCmd, std::string& strRep
return RLV_RET_SUCCESS; return RLV_RET_SUCCESS;
} }
// Checked: 2010-03-19 (RLVa-1.1.3b) | Added: RLVa-1.1.0e // Checked: 2011-05-28 (RLVa-1.4.0a) | Modified: RLVa-1.4.0a
ERlvCmdRet RlvHandler::onGetAttachNames(const RlvCommand& rlvCmd, std::string& strReply) const ERlvCmdRet RlvHandler::onGetAttachNames(const RlvCommand& rlvCmd, std::string& strReply) const
{ {
RLV_ASSERT(RLV_TYPE_REPLY == rlvCmd.getParamType()); RLV_ASSERT(RLV_TYPE_REPLY == rlvCmd.getParamType());
@@ -2102,7 +2097,7 @@ ERlvCmdRet RlvHandler::onGetInv(const RlvCommand& rlvCmd, std::string& strReply)
struct rlv_wear_info { U32 cntWorn, cntTotal, cntChildWorn, cntChildTotal; }; struct rlv_wear_info { U32 cntWorn, cntTotal, cntChildWorn, cntChildTotal; };
// Checked: 2010-04-05 (RLVa-1.1.3a) | Modified: RLVa-1.1.0f // Checked: 2010-04-05 (RLVa-1.2.0d) | Modified: RLVa-1.1.0f
ERlvCmdRet RlvHandler::onGetInvWorn(const RlvCommand& rlvCmd, std::string& strReply) const ERlvCmdRet RlvHandler::onGetInvWorn(const RlvCommand& rlvCmd, std::string& strReply) const
{ {
// Sanity check - gAgentAvatarp can't be NULL [see RlvForceWear::isWearingItem()] // Sanity check - gAgentAvatarp can't be NULL [see RlvForceWear::isWearingItem()]
@@ -2177,7 +2172,7 @@ ERlvCmdRet RlvHandler::onGetInvWorn(const RlvCommand& rlvCmd, std::string& strRe
return RLV_RET_SUCCESS; return RLV_RET_SUCCESS;
} }
// Checked: 2010-03-19 (RLVa-1.2.0c) | Modified: RLVa-1.2.0a // Checked: 2010-03-19 (RLVa-1.4.0a) | Modified: RLVa-1.2.0a
ERlvCmdRet RlvHandler::onGetOutfit(const RlvCommand& rlvCmd, std::string& strReply) const ERlvCmdRet RlvHandler::onGetOutfit(const RlvCommand& rlvCmd, std::string& strReply) const
{ {
RLV_ASSERT(RLV_TYPE_REPLY == rlvCmd.getParamType()); RLV_ASSERT(RLV_TYPE_REPLY == rlvCmd.getParamType());
@@ -2212,7 +2207,7 @@ ERlvCmdRet RlvHandler::onGetOutfit(const RlvCommand& rlvCmd, std::string& strRep
return RLV_RET_SUCCESS; return RLV_RET_SUCCESS;
} }
// Checked: 2009-11-21 (RLVa-1.1.0f) | Added: RLVa-1.1.0e // Checked: 2011-05-28 (RLVa-1.4.0a) | Modified: RLVa-1.4.0a
ERlvCmdRet RlvHandler::onGetOutfitNames(const RlvCommand& rlvCmd, std::string& strReply) const ERlvCmdRet RlvHandler::onGetOutfitNames(const RlvCommand& rlvCmd, std::string& strReply) const
{ {
RLV_ASSERT(RLV_TYPE_REPLY == rlvCmd.getParamType()); RLV_ASSERT(RLV_TYPE_REPLY == rlvCmd.getParamType());

View File

@@ -162,7 +162,7 @@ void RlvCommand::initLookupTable()
"detach", "attach", "addattach", "remattach", "addoutfit", "remoutfit", "sharedwear", "sharedunwear", "detach", "attach", "addattach", "remattach", "addoutfit", "remoutfit", "sharedwear", "sharedunwear",
"unsharedwear", "unsharedunwear", "emote", "sendchat", "recvchat", "recvchatfrom", "recvemote", "recvemotefrom", "unsharedwear", "unsharedunwear", "emote", "sendchat", "recvchat", "recvchatfrom", "recvemote", "recvemotefrom",
"redirchat", "rediremote", "chatwhisper", "chatnormal", "chatshout", "sendchannel", "sendim", "sendimto", "redirchat", "rediremote", "chatwhisper", "chatnormal", "chatshout", "sendchannel", "sendim", "sendimto",
"recvim", "recvimfrom", "permissive", "notify", "showinv", "showminimap", "showworldmap", "showloc", "recvim", "recvimfrom", "startim", "startimto", "permissive", "notify", "showinv", "showminimap", "showworldmap", "showloc",
"shownames", "showhovertext", "showhovertexthud", "showhovertextworld", "showhovertextall", "tplm", "tploc", "tplure", "shownames", "showhovertext", "showhovertexthud", "showhovertextworld", "showhovertextall", "tplm", "tploc", "tplure",
"viewnote", "viewscript", "viewtexture", "acceptpermission", "accepttp", "allowidle", "edit", "editobj", "rez", "fartouch", "viewnote", "viewscript", "viewtexture", "acceptpermission", "accepttp", "allowidle", "edit", "editobj", "rez", "fartouch",
"interact", "touchthis", "touchattach", "touchattachself", "touchattachother", "touchhud", "touchworld", "touchall", "interact", "touchthis", "touchattach", "touchattachself", "touchattachother", "touchhud", "touchworld", "touchall",
@@ -186,7 +186,7 @@ void RlvCommand::initLookupTable()
// RlvCommandOption structures // RlvCommandOption structures
// //
// Checked: 2010-09-28 (RLVa-1.1.3a) | Added: RLVa-1.2.1c // Checked: 2010-09-28 (RLVa-1.2.1c) | Added: RLVa-1.2.1c
RlvCommandOptionGeneric::RlvCommandOptionGeneric(const std::string& strOption) RlvCommandOptionGeneric::RlvCommandOptionGeneric(const std::string& strOption)
{ {
LLWearableType::EType wtType(LLWearableType::WT_INVALID); LLUUID idOption; ERlvAttachGroupType eAttachGroup(RLV_ATTACHGROUP_INVALID); LLWearableType::EType wtType(LLWearableType::WT_INVALID); LLUUID idOption; ERlvAttachGroupType eAttachGroup(RLV_ATTACHGROUP_INVALID);
@@ -456,7 +456,7 @@ std::string RlvObject::getStatusString(const std::string& strMatch) const
// RlvForceWear // RlvForceWear
// //
// Checked: 2010-04-05 (RLVa-1.1.3b) | Modified: RLVa-1.2.0d // Checked: 2010-04-05 (RLVa-1.2.0d) | Modified: RLVa-1.2.0d
bool RlvForceWear::isWearingItem(const LLInventoryItem* pItem) bool RlvForceWear::isWearingItem(const LLInventoryItem* pItem)
{ {
if (pItem) if (pItem)
@@ -479,7 +479,7 @@ bool RlvForceWear::isWearingItem(const LLInventoryItem* pItem)
return false; return false;
} }
// Checked: 2010-03-21 (RLVa-1.1.3a) | Modified: RLVa-1.2.0a // Checked: 2010-03-21 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a
void RlvForceWear::forceFolder(const LLViewerInventoryCategory* pFolder, EWearAction eAction, EWearFlags eFlags) void RlvForceWear::forceFolder(const LLViewerInventoryCategory* pFolder, EWearAction eAction, EWearFlags eFlags)
{ {
// [See LLWearableBridge::wearOnAvatar(): don't wear anything until initial wearables are loaded, can destroy clothing items] // [See LLWearableBridge::wearOnAvatar(): don't wear anything until initial wearables are loaded, can destroy clothing items]
@@ -679,7 +679,7 @@ void RlvForceWear::forceDetach(const LLViewerJointAttachment* pAttachPt)
} }
} }
// Checked: 2010-03-19 (RLVa-1.1.3b) | Modified: RLVa-1.2.0a // Checked: 2010-03-19 (RLVa-1.2.0c) | Modified: RLVa-1.2.0a
bool RlvForceWear::isForceRemovable(const LLViewerWearable* pWearable, bool fCheckComposite /*=true*/, const LLUUID& idExcept /*=LLUUID::null*/) bool RlvForceWear::isForceRemovable(const LLViewerWearable* pWearable, bool fCheckComposite /*=true*/, const LLUUID& idExcept /*=LLUUID::null*/)
{ {
// Wearable can be removed by an RLV command if: // Wearable can be removed by an RLV command if:
@@ -739,7 +739,7 @@ void RlvForceWear::forceRemove(const LLViewerWearable* pWearable)
} }
} }
// Checked: 2010-03-19 (RLVa-1.1.3a) | Added: RLVa-1.2.0a // Checked: 2010-03-19 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
void RlvForceWear::forceRemove(LLWearableType::EType wtType) void RlvForceWear::forceRemove(LLWearableType::EType wtType)
{ {
for (U32 idxWearable = 0, cntWearable = gAgentWearables.getWearableCount(wtType); idxWearable < cntWearable; idxWearable++) for (U32 idxWearable = 0, cntWearable = gAgentWearables.getWearableCount(wtType); idxWearable < cntWearable; idxWearable++)
@@ -883,7 +883,7 @@ void RlvForceWear::addWearable(const LLViewerInventoryItem* pItem, EWearAction e
} }
} }
// Checked: 2010-08-30 (RLVa-1.1.3b) | Modified: RLVa-1.2.1c // Checked: 2010-08-30 (RLVa-1.2.1c) | Modified: RLVa-1.2.1c
void RlvForceWear::remWearable(const LLViewerWearable* pWearable) void RlvForceWear::remWearable(const LLViewerWearable* pWearable)
{ {
// Remove it from 'm_addWearables' if it's queued for wearing // Remove it from 'm_addWearables' if it's queued for wearing
@@ -903,7 +903,7 @@ void RlvForceWear::remWearable(const LLViewerWearable* pWearable)
m_remWearables.push_back(pWearable); m_remWearables.push_back(pWearable);
} }
// Checked: 2010-09-18 (RLVa-1.2.1a) | Modified: RLVa-1.2.1a // Checked: 2010-09-18 (RLVa-1.2.1)
void RlvForceWear::done() void RlvForceWear::done()
{ {
// Sanity check - don't go through all the motions below only to find out there's nothing to actually do // Sanity check - don't go through all the motions below only to find out there's nothing to actually do
@@ -1009,7 +1009,7 @@ void RlvForceWear::done()
// RlvBehaviourNotifyHandler // RlvBehaviourNotifyHandler
// //
// Checked: 2010-09-26 (RLVa-1.1.3a) | Modified: RLVa-1.1.3a // Checked: 2010-03-03 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
RlvBehaviourNotifyHandler::RlvBehaviourNotifyHandler() RlvBehaviourNotifyHandler::RlvBehaviourNotifyHandler()
{ {
// NOTE: the reason we use rlv_command_signal_t instead of the better-suited rlv_behaviour_signal_t is because // NOTE: the reason we use rlv_command_signal_t instead of the better-suited rlv_behaviour_signal_t is because

View File

@@ -20,7 +20,6 @@
#include "llinventoryobserver.h" #include "llinventoryobserver.h"
#include "llstartup.h" #include "llstartup.h"
#include "llviewerfoldertype.h" #include "llviewerfoldertype.h"
#include "llviewermessage.h"
#include "llviewerobject.h" #include "llviewerobject.h"
#include "llvoavatarself.h" #include "llvoavatarself.h"
@@ -243,7 +242,7 @@ bool RlvInventory::getPath(const uuid_vec_t& idItems, LLInventoryModel::cat_arra
return (folders.count() != 0); return (folders.count() != 0);
} }
// Checked: 2011-03-28 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g // Checked: 2011-10-06 (RLVa-1.4.2a) | Modified: RLVa-1.4.2a
const LLUUID& RlvInventory::getSharedRootID() const const LLUUID& RlvInventory::getSharedRootID() const
{ {
if ( (m_idRlvRoot.isNull()) && (gInventory.isInventoryUsable()) ) if ( (m_idRlvRoot.isNull()) && (gInventory.isInventoryUsable()) )
@@ -322,7 +321,7 @@ LLViewerInventoryCategory* RlvInventory::getSharedFolder(const std::string& strP
return pFolder; // If strPath was empty or just a bunch of //// then: pFolder == pRlvRoot return pFolder; // If strPath was empty or just a bunch of //// then: pFolder == pRlvRoot
} }
// Checked: 2010-03-02 (RLVa-1.1.3a) | Modified: RLVa-0.2.0g // Checked: 2010-03-02 (RLVa-1.2.0a) | Modified: RLVa-0.2.0g
std::string RlvInventory::getSharedPath(const LLViewerInventoryCategory* pFolder) const std::string RlvInventory::getSharedPath(const LLViewerInventoryCategory* pFolder) const
{ {
// Sanity check - no shared root or no folder => no path // Sanity check - no shared root or no folder => no path
@@ -380,27 +379,6 @@ S32 RlvInventory::getDirectDescendentsItemCount(const LLInventoryCategory* pFold
return cntType; return cntType;
} }
// Checked: 2012-11-28 (RLVa-1.4.8)
bool RlvInventory::isGiveToRLVOffer(const LLOfferInfo& offerInfo)
{
if ( (!RlvSettings::getForbidGiveToRLV()) && (RlvInventory::instance().getSharedRoot()) )
{
if (offerInfo.mFromObject)
{
return
(IM_TASK_INVENTORY_OFFERED == offerInfo.mIM) &&
(LLAssetType::AT_CATEGORY == offerInfo.mType) && (offerInfo.mDesc.find(RLV_PUTINV_PREFIX) == 1);
}
else
{
return
(IM_INVENTORY_OFFERED == offerInfo.mIM) &&
(LLAssetType::AT_CATEGORY == offerInfo.mType) && (offerInfo.mDesc.find(RLV_PUTINV_PREFIX) == 0);
}
}
return false;
}
// ============================================================================ // ============================================================================
// RlvRenameOnWearObserver member functions // RlvRenameOnWearObserver member functions
// //
@@ -414,7 +392,7 @@ void RlvRenameOnWearObserver::done()
doOnIdleOneTime(boost::bind(&RlvRenameOnWearObserver::doneIdle, this)); doOnIdleOneTime(boost::bind(&RlvRenameOnWearObserver::doneIdle, this));
} }
// Checked: 2010-03-14 (RLVa-1.1.3a) | Added: RLVa-1.2.0a // Checked: 2010-03-14 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
void RlvRenameOnWearObserver::doneIdle() void RlvRenameOnWearObserver::doneIdle()
{ {
const LLViewerInventoryCategory* pRlvRoot = NULL; const LLViewerInventoryCategory* pRlvRoot = NULL;
@@ -599,7 +577,7 @@ void RlvGiveToRLVAgentOffer::done()
doOnIdleOneTime(boost::bind(&RlvGiveToRLVAgentOffer::doneIdle, this)); doOnIdleOneTime(boost::bind(&RlvGiveToRLVAgentOffer::doneIdle, this));
} }
// Checked: 2010-04-18 (RLVa-1.1.3a) | Modified: RLVa-1.2.0e // Checked: 2010-04-18 (RLVa-1.2.0e) | Modified: RLVa-1.2.0e
void RlvGiveToRLVAgentOffer::doneIdle() void RlvGiveToRLVAgentOffer::doneIdle()
{ {
const LLViewerInventoryCategory* pRlvRoot = RlvInventory::instance().getSharedRoot(); const LLViewerInventoryCategory* pRlvRoot = RlvInventory::instance().getSharedRoot();
@@ -680,7 +658,7 @@ const LLUUID& RlvWearableItemCollector::getFoldedParent(const LLUUID& idFolder)
return (m_FoldingMap.end() == itFolder) ? idFolder : itFolder->second; return (m_FoldingMap.end() == itFolder) ? idFolder : itFolder->second;
} }
// Checked: 2010-09-25 (RLVa-1.1.3a) | Added: RLVa-1.2.1c // Checked: 2010-09-25 (RLVa-1.2.1c) | Added: RLVa-1.2.1c
RlvForceWear::EWearAction RlvWearableItemCollector::getWearAction(const LLUUID& idFolder) const RlvForceWear::EWearAction RlvWearableItemCollector::getWearAction(const LLUUID& idFolder) const
{ {
LLUUID idCurFolder(idFolder); std::map<LLUUID, RlvForceWear::EWearAction>::const_iterator itCurFolder; LLUUID idCurFolder(idFolder); std::map<LLUUID, RlvForceWear::EWearAction>::const_iterator itCurFolder;

View File

@@ -26,8 +26,6 @@
#include "rlvhelper.h" #include "rlvhelper.h"
#include "rlvlocks.h" #include "rlvlocks.h"
struct LLOfferInfo;
// ============================================================================ // ============================================================================
// RlvInventory class declaration // RlvInventory class declaration
// //
@@ -63,8 +61,6 @@ public:
std::string getSharedPath(const LLViewerInventoryCategory* pFolder) const; std::string getSharedPath(const LLViewerInventoryCategory* pFolder) const;
// Returns TRUE if the supplied folder is a descendent of the #RLV folder // Returns TRUE if the supplied folder is a descendent of the #RLV folder
bool isSharedFolder(const LLUUID& idFolder); bool isSharedFolder(const LLUUID& idFolder);
// Returns TRUE if the inventory offer is a "give to #RLV" offer
bool isGiveToRLVOffer(const LLOfferInfo& offerInfo);
/* /*
* Inventory fetching * Inventory fetching