aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Server')
-rw-r--r--OpenSim/Server/Base/PluginManager.cs2
-rw-r--r--OpenSim/Server/Base/ServerUtils.cs18
2 files changed, 16 insertions, 4 deletions
diff --git a/OpenSim/Server/Base/PluginManager.cs b/OpenSim/Server/Base/PluginManager.cs
index 6248e74..d2cf668 100644
--- a/OpenSim/Server/Base/PluginManager.cs
+++ b/OpenSim/Server/Base/PluginManager.cs
@@ -246,6 +246,8 @@ namespace OpenSim.Server.Base
246 public bool AddRepository(string repo) 246 public bool AddRepository(string repo)
247 { 247 {
248 Repositories.RegisterRepository(null, repo, true); 248 Repositories.RegisterRepository(null, repo, true);
249 PluginRegistry.Rebuild(null);
250
249 return true; 251 return true;
250 } 252 }
251 253
diff --git a/OpenSim/Server/Base/ServerUtils.cs b/OpenSim/Server/Base/ServerUtils.cs
index d0b6c81..6cbf332 100644
--- a/OpenSim/Server/Base/ServerUtils.cs
+++ b/OpenSim/Server/Base/ServerUtils.cs
@@ -65,6 +65,7 @@ namespace OpenSim.Server.Base
65 65
66 uint Configure(IConfigSource config); 66 uint Configure(IConfigSource config);
67 void Initialize(IHttpServer server); 67 void Initialize(IHttpServer server);
68 void Unload();
68 } 69 }
69 70
70 public class PluginLoader 71 public class PluginLoader
@@ -105,12 +106,17 @@ namespace OpenSim.Server.Base
105 a = Registry.GetAddin(args.ExtensionNode.Addin.Id); 106 a = Registry.GetAddin(args.ExtensionNode.Addin.Id);
106 } 107 }
107 108
108 m_log.InfoFormat("[SERVER]: Extension Change: {0}/{1}", Registry.DefaultAddinsFolder, a.Name.Replace(',', '.'));
109
110 switch(args.Change) 109 switch(args.Change)
111 { 110 {
112 case ExtensionChange.Add: 111 case ExtensionChange.Add:
113 connector.PluginPath = String.Format("{0}/{1}", Registry.DefaultAddinsFolder, a.Name.Replace(',', '.')); 112 if (a.AddinFile.Contains(Registry.DefaultAddinsFolder))
113 {
114 connector.PluginPath = String.Format("{0}/{1}", Registry.DefaultAddinsFolder, a.Name.Replace(',', '.'));
115 }
116 else
117 {
118 connector.PluginPath = a.AddinFile;
119 }
114 LoadPlugin(connector); 120 LoadPlugin(connector);
115 break; 121 break;
116 case ExtensionChange.Remove: 122 case ExtensionChange.Remove:
@@ -127,15 +133,19 @@ namespace OpenSim.Server.Base
127 if(connector.Enabled) 133 if(connector.Enabled)
128 { 134 {
129 server = GetServer(connector, port); 135 server = GetServer(connector, port);
130 m_log.InfoFormat("[SERVER]: Path is {0}", connector.PluginPath);
131 connector.Initialize(server); 136 connector.Initialize(server);
132 } 137 }
133 else 138 else
139 {
134 m_log.InfoFormat("[SERVER]: {0} Disabled.", connector.ConfigName); 140 m_log.InfoFormat("[SERVER]: {0} Disabled.", connector.ConfigName);
141 }
135 } 142 }
136 143
137 private void UnloadPlugin(IRobustConnector connector) 144 private void UnloadPlugin(IRobustConnector connector)
138 { 145 {
146 m_log.InfoFormat("[Server]: Unloading {0}", connector.ConfigName);
147
148 connector.Unload();
139 } 149 }
140 150
141 private IHttpServer GetServer(IRobustConnector connector, uint port) 151 private IHttpServer GetServer(IRobustConnector connector, uint port)