diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 24 | ||||
-rw-r--r-- | OpenSim/Region/Environment/ModuleLoader.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneManager.cs | 5 |
3 files changed, 36 insertions, 0 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 6fd479c..d28d65a 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -961,6 +961,30 @@ namespace OpenSim | |||
961 | m_console.Notice("Shared region module: " + irm.Name); | 961 | m_console.Notice("Shared region module: " + irm.Name); |
962 | } | 962 | } |
963 | break; | 963 | break; |
964 | case "unload": | ||
965 | if (cmdparams.Length > 1) | ||
966 | { | ||
967 | foreach (IRegionModule rm in new System.Collections.ArrayList(m_moduleLoader.GetLoadedSharedModules)) | ||
968 | { | ||
969 | if (rm.Name.ToLower() == cmdparams[1].ToLower()) | ||
970 | { | ||
971 | m_console.Notice("Unloading module: " + rm.Name); | ||
972 | m_moduleLoader.UnloadModule(rm); | ||
973 | } | ||
974 | } | ||
975 | } | ||
976 | break; | ||
977 | case "load": | ||
978 | if (cmdparams.Length > 1) | ||
979 | { | ||
980 | foreach (Scene s in new System.Collections.ArrayList(m_sceneManager.Scenes)) | ||
981 | { | ||
982 | |||
983 | m_console.Notice("Loading module: " + cmdparams[1]); | ||
984 | m_moduleLoader.LoadRegionModules(cmdparams[1], s); | ||
985 | } | ||
986 | } | ||
987 | break; | ||
964 | } | 988 | } |
965 | } | 989 | } |
966 | 990 | ||
diff --git a/OpenSim/Region/Environment/ModuleLoader.cs b/OpenSim/Region/Environment/ModuleLoader.cs index bc0bbaf..1200c8d 100644 --- a/OpenSim/Region/Environment/ModuleLoader.cs +++ b/OpenSim/Region/Environment/ModuleLoader.cs | |||
@@ -294,5 +294,12 @@ namespace OpenSim.Region.Environment | |||
294 | { | 294 | { |
295 | LoadedAssemblys.Clear(); | 295 | LoadedAssemblys.Clear(); |
296 | } | 296 | } |
297 | |||
298 | public void UnloadModule(IRegionModule rm) | ||
299 | { | ||
300 | rm.Close(); | ||
301 | |||
302 | m_loadedModules.Remove(rm); | ||
303 | } | ||
297 | } | 304 | } |
298 | } \ No newline at end of file | 305 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs index 0b88050..490f808 100644 --- a/OpenSim/Region/Environment/Scenes/SceneManager.cs +++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs | |||
@@ -45,6 +45,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
45 | private readonly List<Scene> m_localScenes; | 45 | private readonly List<Scene> m_localScenes; |
46 | private Scene m_currentScene = null; | 46 | private Scene m_currentScene = null; |
47 | 47 | ||
48 | public List<Scene> Scenes | ||
49 | { | ||
50 | get { return m_localScenes; } | ||
51 | } | ||
52 | |||
48 | public Scene CurrentScene | 53 | public Scene CurrentScene |
49 | { | 54 | { |
50 | get { return m_currentScene; } | 55 | get { return m_currentScene; } |