From e2167716aab0d11e09317fcda2001dcabb3a04a5 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 7 Jan 2017 21:44:01 +0000 Subject: change OSSL enable option GOD to use IsGod, so it means a active god, as my original idea --- .../ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 066f6a4..07549f8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -415,24 +415,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } - //Only gods may use the function - if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GOD")) + + //Only grid gods may use the function + if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GRID_GOD")) { - if (World.Permissions.IsGod(ownerID)) + if (World.Permissions.IsGridGod(ownerID)) { return String.Empty; } } - //Only grid gods may use the function - if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GRID_GOD")) + //Only active gods may use the function + if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GOD")) { - if (World.Permissions.IsGridGod(ownerID)) + ScenePresence sp = World.GetScenePresence(ownerID); + if (sp != null && !sp.IsDeleted && sp.IsGod) { return String.Empty; } } + if (!m_FunctionPerms[function].AllowedCreators.Contains(m_item.CreatorID)) return( String.Format("{0} permission denied. Script creator is not in the list of users allowed to execute this function and prim owner also has no permission.", -- cgit v1.1