From e2167716aab0d11e09317fcda2001dcabb3a04a5 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 7 Jan 2017 21:44:01 +0000 Subject: [PATCH] change OSSL enable option GOD to use IsGod, so it means a active god, as my original idea --- .../Shared/Api/Implementation/OSSL_Api.cs | 19 +++++++++++-------- bin/config-include/osslEnable.ini | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 066f6a4e1e..07549f808e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -415,14 +415,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } - //Only gods may use the function - if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GOD")) - { - if (World.Permissions.IsGod(ownerID)) - { - return String.Empty; - } - } //Only grid gods may use the function if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GRID_GOD")) @@ -433,6 +425,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } + //Only active gods may use the function + if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GOD")) + { + 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.", diff --git a/bin/config-include/osslEnable.ini b/bin/config-include/osslEnable.ini index b96688bafd..3859ba6f60 100644 --- a/bin/config-include/osslEnable.ini +++ b/bin/config-include/osslEnable.ini @@ -38,7 +38,7 @@ ; against the owner of the object containing the script. ; The comma separated entries in the list may be one of: ; "GRID_GOD" -- enable for users with UserLevel >= 200 - ; "GOD" -- enable for users with any type of god rights + ; "GOD" -- enable for present and with active god power ; "ESTATE_MANAGER" -- enable for estate manager ; "ESTATE_OWNER" -- enable for estate owner ; "PARCEL_OWNER" -- enable for parcel owner