Added @sendgesture=n to block sending/playing gestures (requested)
--HG-- branch : RLVameow-7.2.2
parent
00ffbb0c0f
commit
3f498c46d5
|
|
@ -56,6 +56,10 @@
|
|||
#include "llappearancemgr.h"
|
||||
#include "llgesturelistener.h"
|
||||
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
#include "rlvactions.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
// Longest time, in seconds, to wait for all animations to stop playing
|
||||
const F32 MAX_WAIT_ANIM_SECS = 30.f;
|
||||
|
||||
|
|
@ -527,6 +531,11 @@ void LLGestureMgr::playGesture(LLMultiGesture* gesture)
|
|||
{
|
||||
if (!gesture) return;
|
||||
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0 | Handles: @sendgesture
|
||||
if (!RlvActions::canPlayGestures())
|
||||
return;
|
||||
// [/RLVa:KB]
|
||||
|
||||
// Reset gesture to first step
|
||||
gesture->mCurrentStep = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (c) 2009-2013, Kitty Barnett
|
||||
* Copyright (c) 2009-2016, Kitty Barnett
|
||||
*
|
||||
* The source code in this file is provided to you under the terms of the
|
||||
* GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY;
|
||||
|
|
@ -38,6 +38,11 @@ bool RlvActions::canReceiveIM(const LLUUID& idSender)
|
|||
( (!gRlvHandler.hasBehaviour(RLV_BHVR_RECVIMFROM)) || (!gRlvHandler.isException(RLV_BHVR_RECVIMFROM, idSender)) ) );
|
||||
}
|
||||
|
||||
bool RlvActions::canPlayGestures()
|
||||
{
|
||||
return (!gRlvHandler.hasBehaviour(RLV_BHVR_SENDGESTURE));
|
||||
}
|
||||
|
||||
// Checked: 2010-11-30 (RLVa-1.3.0)
|
||||
bool RlvActions::canSendIM(const LLUUID& idRecipient)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (c) 2009-2013, Kitty Barnett
|
||||
* Copyright (c) 2009-2016, Kitty Barnett
|
||||
*
|
||||
* The source code in this file is provided to you under the terms of the
|
||||
* GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY;
|
||||
|
|
@ -34,6 +34,11 @@ public:
|
|||
*/
|
||||
static bool canReceiveIM(const LLUUID& idSender);
|
||||
|
||||
/*
|
||||
* Returns true if the user is allowed to send/play gestures (whether active ones from the chat bar or using the gesture preview floater)
|
||||
*/
|
||||
static bool canPlayGestures();
|
||||
|
||||
/*
|
||||
* Returns true if the user is allowed to send IMs to the specified recipient (can be an avatar or a group)
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -143,6 +143,7 @@ enum ERlvBehaviour {
|
|||
RLV_BHVR_RECVIMFROM, // "recvimfrom"
|
||||
RLV_BHVR_STARTIM, // "startim"
|
||||
RLV_BHVR_STARTIMTO, // "startimto"
|
||||
RLV_BHVR_SENDGESTURE,
|
||||
RLV_BHVR_PERMISSIVE, // "permissive"
|
||||
RLV_BHVR_NOTIFY, // "notify"
|
||||
RLV_BHVR_SHOWINV, // "showinv"
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ RlvBehaviourDictionary::RlvBehaviourDictionary()
|
|||
addEntry(new RlvBehaviourGenericProcessor<RLV_OPTION_NONE>("sendchat", RLV_BHVR_SENDCHAT));
|
||||
addEntry(new RlvBehaviourToggleProcessor<RLV_BHVR_SENDIM, RLV_OPTION_NONE_OR_EXCEPTION>("sendim", RlvBehaviourInfo::BHVR_STRICT));
|
||||
addEntry(new RlvBehaviourGenericProcessor<RLV_OPTION_EXCEPTION>("sendimto", RLV_BHVR_SENDIMTO, RlvBehaviourInfo::BHVR_STRICT));
|
||||
addEntry(new RlvBehaviourGenericProcessor<RLV_OPTION_NONE>("sendgesture", RLV_BHVR_SENDGESTURE, RlvBehaviourInfo::BHVR_EXPERIMENTAL));
|
||||
addEntry(new RlvBehaviourGenericProcessor<RLV_OPTION_NONE>("setdebug", RLV_BHVR_SETDEBUG));
|
||||
addEntry(new RlvBehaviourGenericProcessor<RLV_OPTION_NONE>("setenv", RLV_BHVR_SETENV));
|
||||
addEntry(new RlvBehaviourGenericProcessor<RLV_OPTION_NONE>("setgroup", RLV_BHVR_SETGROUP));
|
||||
|
|
|
|||
Loading…
Reference in New Issue