aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSimMain.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-04-27 22:15:38 +0000
committerTeravus Ovares2008-04-27 22:15:38 +0000
commit54563d8dea86ca1e022f3aafa791908e8bcc4912 (patch)
tree2eab339160a5f89cb637c6554e6d56be594d2180 /OpenSim/Region/Application/OpenSimMain.cs
parent* Single Attachments now work from inventory. You can attach from inventory ... (diff)
downloadopensim-SC-54563d8dea86ca1e022f3aafa791908e8bcc4912.zip
opensim-SC-54563d8dea86ca1e022f3aafa791908e8bcc4912.tar.gz
opensim-SC-54563d8dea86ca1e022f3aafa791908e8bcc4912.tar.bz2
opensim-SC-54563d8dea86ca1e022f3aafa791908e8bcc4912.tar.xz
* Patch from XenReborn to make remove-region work properly without needing to do a change-region first. Careful though. I still suggest you do a change-region first.
* Patch from Melanie to implement touch_end. * Thanks XenReborn!. Thanks Melanie!
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs51
1 files changed, 48 insertions, 3 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index 2094578..b322f6d 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -212,7 +212,7 @@ namespace OpenSim
212 if (config != null) 212 if (config != null)
213 { 213 {
214 config.Set("accounts_authenticate", false); 214 config.Set("accounts_authenticate", false);
215 config.Set("welcome_message", "Welcome to OpenSim"); 215 config.Set("welcome_message", "Welcome to Krynn");
216 config.Set("inventory_plugin", "OpenSim.Data.SQLite.dll"); 216 config.Set("inventory_plugin", "OpenSim.Data.SQLite.dll");
217 config.Set("inventory_source", ""); 217 config.Set("inventory_source", "");
218 config.Set("userDatabase_plugin", "OpenSim.Data.SQLite.dll"); 218 config.Set("userDatabase_plugin", "OpenSim.Data.SQLite.dll");
@@ -978,18 +978,63 @@ namespace OpenSim
978 CreateRegion(new RegionInfo(cmdparams[0], "Regions/" + cmdparams[1],false), true); 978 CreateRegion(new RegionInfo(cmdparams[0], "Regions/" + cmdparams[1],false), true);
979 break; 979 break;
980 case "remove-region": 980 case "remove-region":
981
981 string regName = CombineParams(cmdparams, 0); 982 string regName = CombineParams(cmdparams, 0);
982 983
984 Console.WriteLine("Trying to kill: " + regName);
983 Scene killScene; 985 Scene killScene;
984 if (m_sceneManager.TryGetScene(regName, out killScene)) 986
987 /* if (m_sceneManager.TryGetScene(regName, out killScene))
985 { 988 {
989 Console.WriteLine("Returned object ID: ", killScene.RegionInfo.RegionID.ToString());
990 Console.WriteLine("Returned object Name: ", killScene.RegionInfo.RegionName);
991
992
993 if (killScene == null)
994 {
995 Console.WriteLine("Returned object is null!");
996 }
997
986 if (m_sceneManager.CurrentScene.RegionInfo.RegionID == killScene.RegionInfo.RegionID) 998 if (m_sceneManager.CurrentScene.RegionInfo.RegionID == killScene.RegionInfo.RegionID)
987 { 999 {
988 m_sceneManager.TrySetCurrentScene(".."); 1000 m_sceneManager.TrySetCurrentScene("..");
989 } 1001 }
1002
990 m_regionData.Remove(killScene.RegionInfo); 1003 m_regionData.Remove(killScene.RegionInfo);
991 m_sceneManager.CloseScene(killScene); 1004 m_sceneManager.CloseScene(killScene);
1005
1006
1007 }*/
1008
1009
1010 /// note from John R Sohn aka XenReborn (irc.freenode.net)
1011 /// the trygetscene function does not work
1012 /// when debugging it i noticed it did indeed find the region by name
1013 /// but the OUT parameter "scene" return an empty object
1014 /// hence the reason it threw an exception
1015 /// when the server code in this block tried to kill it
1016 /// i know its not supposed to work that way... but it seems..
1017 /// that it is.. given a flaw in the langauge or concurrency error..
1018 /// i have no idea, but for some reason, performing the search here
1019 /// locally does work, as does dynamically killing the region
1020 /// however on server restart, the region returns, i dunno if this was
1021 /// intentional or not.... i suggest creating a seperate function
1022 /// which will permanently remove all data relating to the region
1023 /// as an administrative option... maybe something like "Purge Region"
1024 ///
1025 /// i made editations with debug console output in above commented code..
1026 /// and the trygetscene(string,out scene) function to show whats happening.
1027
1028 for (int x = 0; x < m_sceneManager.Scenes.Count; x++)
1029 {
1030 if (m_sceneManager.Scenes[x].RegionInfo.RegionName.CompareTo(regName) == 0)
1031 {
1032 killScene = m_sceneManager.Scenes[x];
1033 m_regionData.Remove(killScene.RegionInfo);
1034 m_sceneManager.CloseScene(killScene);
1035 }
992 } 1036 }
1037
993 break; 1038 break;
994 1039
995 case "exit": 1040 case "exit":