diff options
5 files changed, 18 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs index 8651b03..5549ea8 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs | |||
@@ -73,7 +73,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
73 | // that has been running too long | 73 | // that has been running too long |
74 | public static MaintenanceThread m_MaintenanceThread; | 74 | public static MaintenanceThread m_MaintenanceThread; |
75 | 75 | ||
76 | public IConfigSource ConfigSource; | 76 | private IConfigSource m_ConfigSource; |
77 | public IConfig ScriptConfigSource; | 77 | public IConfig ScriptConfigSource; |
78 | private bool m_enabled = false; | 78 | private bool m_enabled = false; |
79 | 79 | ||
@@ -82,6 +82,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
82 | get { return ScriptConfigSource; } | 82 | get { return ScriptConfigSource; } |
83 | } | 83 | } |
84 | 84 | ||
85 | public IConfigSource ConfigSource | ||
86 | { | ||
87 | get { return m_ConfigSource; } | ||
88 | } | ||
89 | |||
85 | // How many seconds between re-reading config-file. | 90 | // How many seconds between re-reading config-file. |
86 | // 0 = never. ScriptEngine will try to adjust to new config changes. | 91 | // 0 = never. ScriptEngine will try to adjust to new config changes. |
87 | public int RefreshConfigFileSeconds { | 92 | public int RefreshConfigFileSeconds { |
@@ -119,7 +124,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
119 | 124 | ||
120 | public void Initialise(IConfigSource config) | 125 | public void Initialise(IConfigSource config) |
121 | { | 126 | { |
122 | ConfigSource = config; | 127 | m_ConfigSource = config; |
123 | } | 128 | } |
124 | 129 | ||
125 | public void AddRegion(Scene Sceneworld) | 130 | public void AddRegion(Scene Sceneworld) |
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs index 1fadc79..02d1511 100644 --- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs | |||
@@ -80,6 +80,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces | |||
80 | void ApiResetScript(UUID itemID); | 80 | void ApiResetScript(UUID itemID); |
81 | void ResetScript(UUID itemID); | 81 | void ResetScript(UUID itemID); |
82 | IConfig Config { get; } | 82 | IConfig Config { get; } |
83 | IConfigSource ConfigSource { get; } | ||
83 | string ScriptEngineName { get; } | 84 | string ScriptEngineName { get; } |
84 | IScriptApi GetApi(UUID itemID, string name); | 85 | IScriptApi GetApi(UUID itemID, string name); |
85 | } | 86 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index a10ca3d..40889ca 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -7978,11 +7978,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7978 | public void llSetObjectPermMask(int mask, int value) | 7978 | public void llSetObjectPermMask(int mask, int value) |
7979 | { | 7979 | { |
7980 | m_host.AddScriptLPS(1); | 7980 | m_host.AddScriptLPS(1); |
7981 | IConfigSource config = new IniConfigSource(Application.iniFilePath); | ||
7982 | if (config.Configs["XEngine"] == null) | ||
7983 | config.AddConfig("XEngine"); | ||
7984 | 7981 | ||
7985 | if (config.Configs["XEngine"].GetBoolean("AllowGodFunctions", false)) | 7982 | if (m_ScriptEngine.Config.GetBoolean("AllowGodFunctions", false)) |
7986 | { | 7983 | { |
7987 | if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID)) | 7984 | if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID)) |
7988 | { | 7985 | { |
@@ -8990,7 +8987,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8990 | Dictionary<string, string> httpHeaders = new Dictionary<string, string>(); | 8987 | Dictionary<string, string> httpHeaders = new Dictionary<string, string>(); |
8991 | 8988 | ||
8992 | string shard = "OpenSim"; | 8989 | string shard = "OpenSim"; |
8993 | IConfigSource config = new IniConfigSource(Application.iniFilePath); | 8990 | IConfigSource config = m_ScriptEngine.ConfigSource; |
8994 | if (config.Configs["Network"] != null) | 8991 | if (config.Configs["Network"] != null) |
8995 | { | 8992 | { |
8996 | shard | 8993 | shard |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index 5090e89..2457b3a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | |||
@@ -950,6 +950,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
950 | "Line ({0}): {1}", scriptLine - 1, | 950 | "Line ({0}): {1}", scriptLine - 1, |
951 | e.InnerException.Message); | 951 | e.InnerException.Message); |
952 | 952 | ||
953 | System.Console.WriteLine(e.ToString()+"\n"); | ||
953 | return message; | 954 | return message; |
954 | } | 955 | } |
955 | } | 956 | } |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 34f8145..4ab564b 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -60,6 +60,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
60 | private int m_MaxScriptQueue; | 60 | private int m_MaxScriptQueue; |
61 | private Scene m_Scene; | 61 | private Scene m_Scene; |
62 | private IConfig m_ScriptConfig = null; | 62 | private IConfig m_ScriptConfig = null; |
63 | private IConfigSource m_ConfigSource = null; | ||
63 | private ICompiler m_Compiler; | 64 | private ICompiler m_Compiler; |
64 | private int m_MinThreads; | 65 | private int m_MinThreads; |
65 | private int m_MaxThreads ; | 66 | private int m_MaxThreads ; |
@@ -148,6 +149,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
148 | get { return m_ScriptConfig; } | 149 | get { return m_ScriptConfig; } |
149 | } | 150 | } |
150 | 151 | ||
152 | public IConfigSource ConfigSource | ||
153 | { | ||
154 | get { return m_ConfigSource; } | ||
155 | } | ||
156 | |||
151 | public event ScriptRemoved OnScriptRemoved; | 157 | public event ScriptRemoved OnScriptRemoved; |
152 | public event ObjectRemoved OnObjectRemoved; | 158 | public event ObjectRemoved OnObjectRemoved; |
153 | 159 | ||
@@ -160,6 +166,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
160 | return; | 166 | return; |
161 | 167 | ||
162 | m_ScriptConfig = configSource.Configs["XEngine"]; | 168 | m_ScriptConfig = configSource.Configs["XEngine"]; |
169 | m_ConfigSource = configSource; | ||
163 | } | 170 | } |
164 | 171 | ||
165 | public void AddRegion(Scene scene) | 172 | public void AddRegion(Scene scene) |