aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
index bd60759..b5cbd25 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
@@ -28,6 +28,8 @@
28using System; 28using System;
29using System.Reflection; 29using System.Reflection;
30using System.Globalization; 30using System.Globalization;
31using System.Runtime.Remoting;
32using System.Runtime.Remoting.Lifetime;
31using log4net; 33using log4net;
32using OpenMetaverse; 34using OpenMetaverse;
33using OpenSim.Framework; 35using OpenSim.Framework;
@@ -39,6 +41,7 @@ using System.Collections.Generic;
39using System.IO; 41using System.IO;
40using System.Runtime.Serialization.Formatters.Binary; 42using System.Runtime.Serialization.Formatters.Binary;
41using System.Threading; 43using System.Threading;
44using OpenSim.Region.ScriptEngine.Shared.Api.Runtime;
42using OpenSim.Region.ScriptEngine.Shared.ScriptBase; 45using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
43using OpenSim.Region.ScriptEngine.Shared.CodeTools; 46using OpenSim.Region.ScriptEngine.Shared.CodeTools;
44 47
@@ -56,6 +59,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
56 public Dictionary<string, IScriptApi> Apis; 59 public Dictionary<string, IScriptApi> Apis;
57 public Dictionary<KeyValuePair<int,int>, KeyValuePair<int,int>> 60 public Dictionary<KeyValuePair<int,int>, KeyValuePair<int,int>>
58 LineMap; 61 LineMap;
62 public ISponsor ScriptSponsor;
59 } 63 }
60 64
61 public class ScriptManager 65 public class ScriptManager
@@ -164,6 +168,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
164 CompiledScript = 168 CompiledScript =
165 m_scriptEngine.m_AppDomainManager.LoadScript( 169 m_scriptEngine.m_AppDomainManager.LoadScript(
166 CompiledScriptFile, out id.AppDomain); 170 CompiledScriptFile, out id.AppDomain);
171 //Register the sponsor
172 ISponsor scriptSponsor = new ScriptSponsor();
173 ILease lease = (ILease)RemotingServices.GetLifetimeService(CompiledScript as MarshalByRefObject);
174 lease.Register(scriptSponsor);
175 id.ScriptSponsor = scriptSponsor;
167 176
168 id.LineMap = LSLCompiler.LineMap(); 177 id.LineMap = LSLCompiler.LineMap();
169 id.Script = CompiledScript; 178 id.Script = CompiledScript;