diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs index c8c9cd8..0308169 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs | |||
@@ -215,6 +215,12 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
215 | 215 | ||
216 | public void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine) | 216 | public void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine) |
217 | { | 217 | { |
218 | List<IScriptModule> engines = new List<IScriptModule>(myScriptEngine.World.RequestModuleInterfaces<IScriptModule>()); | ||
219 | |||
220 | List<string> names = new List<string>(); | ||
221 | foreach (IScriptModule m in engines) | ||
222 | names.Add(m.ScriptEngineName); | ||
223 | |||
218 | int lineEnd = script.IndexOf('\n'); | 224 | int lineEnd = script.IndexOf('\n'); |
219 | 225 | ||
220 | if (lineEnd != 1) | 226 | if (lineEnd != 1) |
@@ -224,8 +230,13 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
224 | int colon = firstline.IndexOf(':'); | 230 | int colon = firstline.IndexOf(':'); |
225 | if (firstline.Length > 2 && firstline.Substring(0, 2) == "//" && colon != -1) | 231 | if (firstline.Length > 2 && firstline.Substring(0, 2) == "//" && colon != -1) |
226 | { | 232 | { |
227 | engine = firstline.Substring(2, colon-2); | 233 | string engineName = firstline.Substring(2, colon-2); |
228 | script = "//" + script.Substring(script.IndexOf(':')+1); | 234 | |
235 | if (names.Contains(engineName)) | ||
236 | { | ||
237 | engine = engineName; | ||
238 | script = "//" + script.Substring(script.IndexOf(':')+1); | ||
239 | } | ||
229 | } | 240 | } |
230 | } | 241 | } |
231 | 242 | ||