From 09dac6b558f33c91325bd70ae5689e76cabffd2a Mon Sep 17 00:00:00 2001 From: mingchen Date: Sat, 9 Jun 2007 00:47:02 +0000 Subject: *Adding configuration settings for master avatars *Sandbox mode password is there, but should I store this in config and ask every time? --- Common/OpenSim.Framework/Types/RegionInfo.cs | 44 +++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) (limited to 'Common/OpenSim.Framework/Types/RegionInfo.cs') diff --git a/Common/OpenSim.Framework/Types/RegionInfo.cs b/Common/OpenSim.Framework/Types/RegionInfo.cs index 6b835cb..47e208e 100644 --- a/Common/OpenSim.Framework/Types/RegionInfo.cs +++ b/Common/OpenSim.Framework/Types/RegionInfo.cs @@ -22,6 +22,7 @@ namespace OpenSim.Framework.Types public LLUUID MasterAvatarAssignedUUID = new LLUUID(); public string MasterAvatarFirstName = ""; public string MasterAvatarLastName = ""; + public string MasterAvatarSandboxPassword = ""; public int IPListenPort = 0; public string IPListenAddr = ""; @@ -150,8 +151,49 @@ namespace OpenSim.Framework.Types this.IPListenAddr = attri; } } + attri = ""; + attri = configData.GetAttribute("MasterAvatarFirstName"); + if (attri == "") + { + this.MasterAvatarFirstName = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("First name of Master Avatar (Land and Region Owner)", "Test"); + + configData.SetAttribute("MasterAvatarFirstName", this.MasterAvatarFirstName); + } + else + { + this.MasterAvatarFirstName = attri; + } + + attri = ""; + attri = configData.GetAttribute("MasterAvatarLastName"); + if (attri == "") + { + this.MasterAvatarLastName = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Last name of Master Avatar (Land and Region Owner)", "User"); + + configData.SetAttribute("MasterAvatarLastName", this.MasterAvatarLastName); + } + else + { + this.MasterAvatarLastName = attri; + } + + if (isSandbox) //Sandbox Mode Specific Settings + { + attri = ""; + attri = configData.GetAttribute("MasterAvatarSandboxPassword"); + if (attri == "") + { + this.MasterAvatarSandboxPassword = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Password of Master Avatar (Needed for sandbox mode account creation only)", "test"); + + //Should I store this? + configData.SetAttribute("MasterAvatarSandboxPassword", this.MasterAvatarSandboxPassword); + } + else + { + this.MasterAvatarSandboxPassword = attri; + } + } - this.RegionHandle = Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256)); configData.Commit(); -- cgit v1.1