[FIXED] Commands implemented as extensions (@setev, @setdebug and @setdebug) fail with unknown command
--HG-- branch : RLVamaster
parent
651b53944c
commit
958922998b
|
|
@ -305,15 +305,14 @@ void RlvBehaviourDictionary::toggleBehaviourFlag(const std::string& strBhvr, ERl
|
|||
RlvCommand::RlvCommand(const LLUUID& idObj, const std::string& strCommand)
|
||||
: m_fValid(false), m_idObj(idObj), m_pBhvrInfo(NULL), m_eParamType(RLV_TYPE_UNKNOWN), m_fStrict(false), m_eRet(RLV_RET_UNKNOWN)
|
||||
{
|
||||
std::string strBehaviour;
|
||||
if (m_fValid = parseCommand(strCommand, strBehaviour, m_strOption, m_strParam))
|
||||
if (m_fValid = parseCommand(strCommand, m_strBehaviour, m_strOption, m_strParam))
|
||||
{
|
||||
S32 nTemp = 0;
|
||||
if ( ("n" == m_strParam) || ("add" == m_strParam) )
|
||||
m_eParamType = RLV_TYPE_ADD;
|
||||
else if ( ("y" == m_strParam) || ("rem" == m_strParam) )
|
||||
m_eParamType = RLV_TYPE_REMOVE;
|
||||
else if (strBehaviour == "clear") // clear is the odd one out so just make it its own type
|
||||
else if (m_strBehaviour == "clear") // clear is the odd one out so just make it its own type
|
||||
m_eParamType = RLV_TYPE_CLEAR;
|
||||
else if ("force" == m_strParam)
|
||||
m_eParamType = RLV_TYPE_FORCE;
|
||||
|
|
@ -332,7 +331,7 @@ RlvCommand::RlvCommand(const LLUUID& idObj, const std::string& strCommand)
|
|||
return;
|
||||
}
|
||||
|
||||
m_pBhvrInfo = RlvBehaviourDictionary::instance().getBehaviourInfo(strBehaviour, m_eParamType, &m_fStrict);
|
||||
m_pBhvrInfo = RlvBehaviourDictionary::instance().getBehaviourInfo(m_strBehaviour, m_eParamType, &m_fStrict);
|
||||
}
|
||||
|
||||
bool RlvCommand::parseCommand(const std::string& strCommand, std::string& strBehaviour, std::string& strOption, std::string& strParam)
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ public:
|
|||
*/
|
||||
public:
|
||||
std::string asString() const;
|
||||
const std::string& getBehaviour() const { return (m_pBhvrInfo) ? m_pBhvrInfo->getBehaviour() : LLStringUtil::null; }
|
||||
const std::string& getBehaviour() const { return (m_pBhvrInfo) ? m_pBhvrInfo->getBehaviour() : m_strBehaviour; }
|
||||
ERlvBehaviour getBehaviourType() const { return (m_pBhvrInfo) ? m_pBhvrInfo->getBehaviourType() : RLV_BHVR_UNKNOWN; }
|
||||
U32 getBehaviourFlags() const{ return (m_pBhvrInfo) ? m_pBhvrInfo->getBehaviourFlags() : 0; }
|
||||
const LLUUID& getObjectID() const { return m_idObj; }
|
||||
|
|
@ -220,7 +220,7 @@ public:
|
|||
bool isBlocked() const { return (m_pBhvrInfo) ? m_pBhvrInfo->isBlocked() : false; }
|
||||
bool isStrict() const { return m_fStrict; }
|
||||
bool isValid() const { return m_fValid; }
|
||||
ERlvCmdRet processCommand() const { return (m_pBhvrInfo) ? m_pBhvrInfo->processCommand(*this) : RLV_RET_FAILED_UNKNOWN; }
|
||||
ERlvCmdRet processCommand() const { return (m_pBhvrInfo) ? m_pBhvrInfo->processCommand(*this) : RLV_RET_NO_PROCESSOR; }
|
||||
|
||||
protected:
|
||||
static bool parseCommand(const std::string& strCommand, std::string& strBehaviour, std::string& strOption, std::string& strParam);
|
||||
|
|
@ -237,6 +237,7 @@ public:
|
|||
protected:
|
||||
bool m_fValid;
|
||||
LLUUID m_idObj;
|
||||
std::string m_strBehaviour;
|
||||
const RlvBehaviourInfo* m_pBhvrInfo;
|
||||
ERlvParamType m_eParamType;
|
||||
bool m_fStrict;
|
||||
|
|
|
|||
Loading…
Reference in New Issue