diff options
author | lbsa71 | 2007-09-19 00:30:55 +0000 |
---|---|---|
committer | lbsa71 | 2007-09-19 00:30:55 +0000 |
commit | 8f0b03597b0bc8ea6873af9a55495407fae1ec56 (patch) | |
tree | f9f4de38379aebf2223ad4cb10a3d9ebcfa52a4f /OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs | |
parent | * Moved SendLogoutPacket back to IClientAPI. (diff) | |
download | opensim-SC_OLD-8f0b03597b0bc8ea6873af9a55495407fae1ec56.zip opensim-SC_OLD-8f0b03597b0bc8ea6873af9a55495407fae1ec56.tar.gz opensim-SC_OLD-8f0b03597b0bc8ea6873af9a55495407fae1ec56.tar.bz2 opensim-SC_OLD-8f0b03597b0bc8ea6873af9a55495407fae1ec56.tar.xz |
* Modernized ScriptManager to new interface-based module calls.
* 'remove redundant this qualifier' ftw
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs b/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs index 83bd0ab..5355388 100644 --- a/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs +++ b/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs | |||
@@ -26,18 +26,18 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | /* Original code: Tedd Hansen */ | 28 | /* Original code: Tedd Hansen */ |
29 | using System; | 29 | using System; |
30 | using System.Collections.Generic; | 30 | using System.IO; |
31 | using System.IO; | 31 | using System.Reflection; |
32 | using System.Text; | 32 | using OpenSim.Framework.Console; |
33 | using System.Reflection; | 33 | |
34 | |||
35 | namespace OpenSim.Region.Environment.Scenes.Scripting | 34 | namespace OpenSim.Region.Environment.Scenes.Scripting |
36 | { | 35 | { |
37 | public class ScriptEngineLoader | 36 | public class ScriptEngineLoader |
38 | { | 37 | { |
39 | private OpenSim.Framework.Console.LogBase m_log; | 38 | private LogBase m_log; |
40 | public ScriptEngineLoader(OpenSim.Framework.Console.LogBase logger) | 39 | |
40 | public ScriptEngineLoader(LogBase logger) | ||
41 | { | 41 | { |
42 | m_log = logger; | 42 | m_log = logger; |
43 | } | 43 | } |
@@ -47,12 +47,16 @@ namespace OpenSim.Region.Environment.Scenes.Scripting | |||
47 | ScriptEngineInterface ret = null; | 47 | ScriptEngineInterface ret = null; |
48 | try | 48 | try |
49 | { | 49 | { |
50 | ret = LoadAndInitAssembly(Path.Combine("ScriptEngines", "OpenSim.Region.ScriptEngine." + EngineName + ".dll"), | 50 | ret = |
51 | "OpenSim.Region.ScriptEngine." + EngineName + ".ScriptEngine"); | 51 | LoadAndInitAssembly( |
52 | Path.Combine("ScriptEngines", "OpenSim.Region.ScriptEngine." + EngineName + ".dll"), | ||
53 | "OpenSim.Region.ScriptEngine." + EngineName + ".ScriptEngine"); | ||
52 | } | 54 | } |
53 | catch (Exception e) | 55 | catch (Exception e) |
54 | { | 56 | { |
55 | m_log.Error("ScriptEngine", "Error loading assembly \"" + EngineName + "\": " + e.Message + ", " + e.StackTrace.ToString()); | 57 | m_log.Error("ScriptEngine", |
58 | "Error loading assembly \"" + EngineName + "\": " + e.Message + ", " + | ||
59 | e.StackTrace.ToString()); | ||
56 | } | 60 | } |
57 | return ret; | 61 | return ret; |
58 | } | 62 | } |
@@ -107,18 +111,14 @@ namespace OpenSim.Region.Environment.Scenes.Scripting | |||
107 | ScriptEngineInterface ret; | 111 | ScriptEngineInterface ret; |
108 | //try | 112 | //try |
109 | //{ | 113 | //{ |
110 | ret = (ScriptEngineInterface)Activator.CreateInstance(t); | 114 | ret = (ScriptEngineInterface) Activator.CreateInstance(t); |
111 | //} | 115 | //} |
112 | //catch (Exception e) | 116 | //catch (Exception e) |
113 | //{ | 117 | //{ |
114 | // m_log.Error("ScriptEngine", "Error initializing type \"" + NameSpace + "\" from \"" + FileName + "\": " + e.ToString()); | 118 | // m_log.Error("ScriptEngine", "Error initializing type \"" + NameSpace + "\" from \"" + FileName + "\": " + e.ToString()); |
115 | //} | 119 | //} |
116 | 120 | ||
117 | return ret; | 121 | return ret; |
118 | 122 | } | |
119 | |||
120 | } | ||
121 | |||
122 | |||
123 | } | 123 | } |
124 | } | 124 | } \ No newline at end of file |