mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Add perms check
This commit is contained in:
@@ -49,6 +49,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
public class MovementAnimationOverrides
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private Dictionary<string, UUID> m_overrides = new Dictionary<string, UUID>();
|
||||
public void SetOverride(string state, UUID animID)
|
||||
{
|
||||
@@ -58,6 +61,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
return;
|
||||
}
|
||||
|
||||
m_log.DebugFormat("Setting override for {0} to {1}", state, animID);
|
||||
|
||||
lock (m_overrides)
|
||||
m_overrides[state] = animID;
|
||||
}
|
||||
|
||||
@@ -13497,7 +13497,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
|
||||
if (m_item.PermsGranter == UUID.Zero)
|
||||
{
|
||||
llShout(ScriptBaseClass.DEBUG_CHANNEL, "No permission to override animations");
|
||||
return;
|
||||
}
|
||||
|
||||
if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_OVERRIDE_ANIMATIONS) == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user