aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorMelanie Thielker2017-01-07 23:12:51 +0000
committerMelanie Thielker2017-01-07 23:12:51 +0000
commitf457925f80ec1651975fc5208cbc06be3ae8891e (patch)
tree3f17df5ea98fac1f0a158f660911ae1266ff6a63 /OpenSim/Region/ScriptEngine
parentMerge branch 'master' of opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC_OLD-f457925f80ec1651975fc5208cbc06be3ae8891e.zip
opensim-SC_OLD-f457925f80ec1651975fc5208cbc06be3ae8891e.tar.gz
opensim-SC_OLD-f457925f80ec1651975fc5208cbc06be3ae8891e.tar.bz2
opensim-SC_OLD-f457925f80ec1651975fc5208cbc06be3ae8891e.tar.xz
Fix a compile issue and reintroduce the "GOD" script option
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs11
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs44
2 files changed, 32 insertions, 23 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index bb475a2..5b783f7 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -310,7 +310,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
310 foreach (string id in ids) 310 foreach (string id in ids)
311 { 311 {
312 string current = id.Trim(); 312 string current = id.Trim();
313 if (current.ToUpper() == "PARCEL_GROUP_MEMBER" || current.ToUpper() == "PARCEL_OWNER" || current.ToUpper() == "ESTATE_MANAGER" || current.ToUpper() == "ESTATE_OWNER" || current.ToUpper() == "ACTIVE_GOD" || current.ToUpper() == "GRID_GOD") 313 if (current.ToUpper() == "PARCEL_GROUP_MEMBER" || current.ToUpper() == "PARCEL_OWNER" || current.ToUpper() == "ESTATE_MANAGER" || current.ToUpper() == "ESTATE_OWNER" || current.ToUpper() == "ACTIVE_GOD" || current.ToUpper() == "GRID_GOD" || current.ToUpper() == "GOD")
314 { 314 {
315 if (!perms.AllowedOwnerClasses.Contains(current)) 315 if (!perms.AllowedOwnerClasses.Contains(current))
316 perms.AllowedOwnerClasses.Add(current.ToUpper()); 316 perms.AllowedOwnerClasses.Add(current.ToUpper());
@@ -425,6 +425,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
425 } 425 }
426 } 426 }
427 427
428 //Any god may use the function
429 if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GOD"))
430 {
431 if (World.Permissions.IsAdministrator(ownerID))
432 {
433 return String.Empty;
434 }
435 }
436
428 //Only active gods may use the function 437 //Only active gods may use the function
429 if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("ACTIVE_GOD")) 438 if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("ACTIVE_GOD"))
430 { 439 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index f4ea5e9..de0a80d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -927,28 +927,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
927 927
928 if(e.InnerException != null && e.InnerException is ScriptException) 928 if(e.InnerException != null && e.InnerException is ScriptException)
929 { 929 {
930 if (e.InnerException.Message == "Softfail") 930 if (e.InnerException.Message != "Softfail")
931 return; 931 {
932 932 string text = e.InnerException.Message +
933 string text = e.InnerException.Message + 933 "(script: " + ScriptName +
934 "(script: " + ScriptName + 934 " event: " + data.EventName +
935 " event: " + data.EventName + 935 " at " + Part.AbsolutePosition + ")";
936 " at " + Part.AbsolutePosition + ")"; 936 if (text.Length > 1000)
937 if (text.Length > 1000) 937 text = text.Substring(0, 1000);
938 text = text.Substring(0, 1000); 938 Engine.World.SimChat(Utils.StringToBytes(text),
939 Engine.World.SimChat(Utils.StringToBytes(text), 939 ChatTypeEnum.DebugChannel, 2147483647,
940 ChatTypeEnum.DebugChannel, 2147483647, 940 Part.AbsolutePosition,
941 Part.AbsolutePosition, 941 Part.Name, Part.UUID, false);
942 Part.Name, Part.UUID, false); 942 m_log.Debug(string.Format(
943 m_log.Debug(string.Format( 943 "[SCRIPT INSTANCE]: {0} (at event {1}, part {2} {3} at {4} in {5}",
944 "[SCRIPT INSTANCE]: {0} (at event {1}, part {2} {3} at {4} in {5}", 944 e.InnerException.Message,
945 e.InnerException.Message, 945 data.EventName,
946 data.EventName, 946 PrimName,
947 PrimName, 947 Part.UUID,
948 Part.UUID, 948 Part.AbsolutePosition,
949 Part.AbsolutePosition, 949 Part.ParentGroup.Scene.Name));
950 Part.ParentGroup.Scene.Name)); 950
951 951 }
952 } 952 }
953 else 953 else
954 { 954 {