change OSSL enable option GOD to use IsGod, so it means a active god, as my original idea

This commit is contained in:
UbitUmarov
2017-01-07 21:44:01 +00:00
parent 2798adcdcd
commit e2167716aa
2 changed files with 12 additions and 9 deletions

View File

@@ -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.",