aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/GridServer/GridServerBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Grid/GridServer/GridServerBase.cs')
-rw-r--r--OpenSim/Grid/GridServer/GridServerBase.cs27
1 files changed, 9 insertions, 18 deletions
diff --git a/OpenSim/Grid/GridServer/GridServerBase.cs b/OpenSim/Grid/GridServer/GridServerBase.cs
index 7891c29..010c250 100644
--- a/OpenSim/Grid/GridServer/GridServerBase.cs
+++ b/OpenSim/Grid/GridServer/GridServerBase.cs
@@ -116,26 +116,17 @@ namespace OpenSim.Grid.GridServer
116 m_httpServer.AddStreamHandler(new RestStreamHandler("POST", "/regions/", m_gridManager.RestSetRegionMethod)); 116 m_httpServer.AddStreamHandler(new RestStreamHandler("POST", "/regions/", m_gridManager.RestSetRegionMethod));
117 } 117 }
118 118
119 protected void LoadGridPlugins() 119 protected void grid_plugin_initialiser_ (IPlugin plugin)
120 { 120 {
121 // Temporary hack to stop mono-addins scanning warnings from coming out on the console 121 IGridPlugin p = plugin as IGridPlugin;
122 TextWriter oldOutput = Console.Out; 122 p.Initialise (this);
123 Console.SetOut(new StreamWriter(Stream.Null)); 123 }
124
125 AddinManager.Initialize(".");
126 AddinManager.Registry.Update(null);
127
128 // Returns the console.writelines back to the console's stream
129 Console.SetOut(oldOutput);
130 124
131 ExtensionNodeList nodes = AddinManager.GetExtensionNodes("/OpenSim/GridServer"); 125 protected void LoadGridPlugins()
132 foreach (TypeExtensionNode node in nodes) 126 {
133 { 127 PluginLoader<IGridPlugin> loader = new PluginLoader<IGridPlugin> (".");
134 m_log.Info("[GRID PLUGINS]: Loading OpenSim plugin " + node.Path); 128 loader.Load ("/OpenSim/GridServer", grid_plugin_initialiser_);
135 IGridPlugin plugin = (IGridPlugin)node.CreateInstance(); 129 m_plugins = loader.Plugins;
136 plugin.Initialise(this);
137 m_plugins.Add(plugin);
138 }
139 } 130 }
140 131
141 protected virtual void SetupGridManager() 132 protected virtual void SetupGridManager()