aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common/Executor.cs
diff options
context:
space:
mode:
authorTedd Hansen2007-08-19 17:47:47 +0000
committerTedd Hansen2007-08-19 17:47:47 +0000
commit1b826c2fdc85faf47a26fd2ad5d20a025ab087ba (patch)
tree1034f941e7983bc3368202fcbc0e89b1a901ac52 /OpenSim/Region/ScriptEngine/Common/Executor.cs
parentsmall clean up. (diff)
downloadopensim-SC-1b826c2fdc85faf47a26fd2ad5d20a025ab087ba.zip
opensim-SC-1b826c2fdc85faf47a26fd2ad5d20a025ab087ba.tar.gz
opensim-SC-1b826c2fdc85faf47a26fd2ad5d20a025ab087ba.tar.bz2
opensim-SC-1b826c2fdc85faf47a26fd2ad5d20a025ab087ba.tar.xz
Added "StopScriot()" to ScriptManager. Stops Executor from executing events in script, removes script from EventQueueManagers target list, tells AppDomainManager that script is no longer active (and ready for unload).
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/Executor.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/Executor.cs18
1 files changed, 17 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/Executor.cs b/OpenSim/Region/ScriptEngine/Common/Executor.cs
index dedf00d..148ae0f 100644
--- a/OpenSim/Region/ScriptEngine/Common/Executor.cs
+++ b/OpenSim/Region/ScriptEngine/Common/Executor.cs
@@ -17,12 +17,24 @@ namespace OpenSim.Region.ScriptEngine.Common
17 17
18 private IScript m_Script; 18 private IScript m_Script;
19 private Dictionary<string, MethodInfo> Events = new Dictionary<string, MethodInfo>(); 19 private Dictionary<string, MethodInfo> Events = new Dictionary<string, MethodInfo>();
20 private bool m_Running = true;
21
20 22
21 public Executor(IScript Script) 23 public Executor(IScript Script)
22 { 24 {
23 m_Script = Script; 25 m_Script = Script;
24 26
25 } 27 }
28
29 public void StopScript()
30 {
31 m_Running = false;
32 }
33 public AppDomain GetAppDomain()
34 {
35 return AppDomain.CurrentDomain;
36 }
37
26 public void ExecuteEvent(string FunctionName, object[] args) 38 public void ExecuteEvent(string FunctionName, object[] args)
27 { 39 {
28 // IMPORTANT: Types and MemberInfo-derived objects require a LOT of memory. 40 // IMPORTANT: Types and MemberInfo-derived objects require a LOT of memory.
@@ -36,7 +48,11 @@ namespace OpenSim.Region.ScriptEngine.Common
36 //} 48 //}
37 //} 49 //}
38 50
39 51 if (m_Running == false)
52 {
53 // Script is inactive, do not execute!
54 return;
55 }
40 56
41 string EventName = m_Script.State() + "_event_" + FunctionName; 57 string EventName = m_Script.State() + "_event_" + FunctionName;
42 58