diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 25 |
1 files changed, 16 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 a8c1a8f..fb58850 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -274,15 +274,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
274 | // or a string explaining why this function can't be used. | 274 | // or a string explaining why this function can't be used. |
275 | private string CheckThreatLevelTest(ThreatLevel level, string function) | 275 | private string CheckThreatLevelTest(ThreatLevel level, string function) |
276 | { | 276 | { |
277 | // Grid gods can do anything they damn well please. | 277 | // This test is coz the test system manages to call scripts without having them in items. |
278 | if (World.Permissions.IsGridGod(m_item.OwnerID)) | 278 | //// TODO - fix up the test system. |
279 | return String.Empty; | 279 | if ((null != m_item) && (null != m_item.OwnerID)) |
280 | else | 280 | { |
281 | { | 281 | // Grid gods can do anything they damn well please. |
282 | // So can active gods. | 282 | if (World.Permissions.IsGridGod(m_item.OwnerID)) |
283 | ScenePresence sp = World.GetScenePresence(m_item.OwnerID); | 283 | { |
284 | if (sp != null && !sp.IsDeleted && sp.IsGod) | 284 | return String.Empty; |
285 | return String.Empty; | 285 | } |
286 | else | ||
287 | { | ||
288 | // So can active gods. | ||
289 | ScenePresence sp = World.GetScenePresence(m_item.OwnerID); | ||
290 | if (sp != null && !sp.IsDeleted && sp.IsGod) | ||
291 | return String.Empty; | ||
292 | } | ||
286 | } | 293 | } |
287 | 294 | ||
288 | if (!m_FunctionPerms.ContainsKey(function)) | 295 | if (!m_FunctionPerms.ContainsKey(function)) |