diff options
author | MW | 2007-08-11 11:59:51 +0000 |
---|---|---|
committer | MW | 2007-08-11 11:59:51 +0000 |
commit | 114807b9d1caeffad1f245982baa2c07e88ee470 (patch) | |
tree | f3a3ed3c24de47085192d7215a81ef25254fceda /OpenSim/Region/Communications/Local/CommunicationsLocal.cs | |
parent | Few small fixes (diff) | |
download | opensim-SC-114807b9d1caeffad1f245982baa2c07e88ee470.zip opensim-SC-114807b9d1caeffad1f245982baa2c07e88ee470.tar.gz opensim-SC-114807b9d1caeffad1f245982baa2c07e88ee470.tar.bz2 opensim-SC-114807b9d1caeffad1f245982baa2c07e88ee470.tar.xz |
Made account Authentication optional in "sandbox/standalone" mode. Just change "standalone_authenticate = false" to be true in OpenSim.ini. Then as per grid mode, you can use the "create user" command to create new accounts.
Diffstat (limited to 'OpenSim/Region/Communications/Local/CommunicationsLocal.cs')
-rw-r--r-- | OpenSim/Region/Communications/Local/CommunicationsLocal.cs | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs index 0c40453..69352d1 100644 --- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs +++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs | |||
@@ -25,10 +25,13 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | ||
28 | using OpenSim.Framework.Communications; | 29 | using OpenSim.Framework.Communications; |
29 | using OpenSim.Framework.Types; | 30 | using OpenSim.Framework.Types; |
30 | using OpenSim.Framework.Servers; | 31 | using OpenSim.Framework.Servers; |
31 | using OpenSim.Framework.Communications.Caches; | 32 | using OpenSim.Framework.Communications.Caches; |
33 | using OpenSim.Framework.Console; | ||
34 | using OpenSim.Framework.Utilities; | ||
32 | 35 | ||
33 | namespace OpenSim.Region.Communications.Local | 36 | namespace OpenSim.Region.Communications.Local |
34 | { | 37 | { |
@@ -37,10 +40,10 @@ namespace OpenSim.Region.Communications.Local | |||
37 | public LocalBackEndServices SandBoxServices = new LocalBackEndServices(); | 40 | public LocalBackEndServices SandBoxServices = new LocalBackEndServices(); |
38 | public LocalUserServices UserServices; | 41 | public LocalUserServices UserServices; |
39 | 42 | ||
40 | public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache ) | 43 | public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, bool accountsAuthenticate ) |
41 | : base(serversInfo, httpServer, assetCache) | 44 | : base(serversInfo, httpServer, assetCache) |
42 | { | 45 | { |
43 | UserServices = new LocalUserServices(this, serversInfo); | 46 | UserServices = new LocalUserServices(this, serversInfo, accountsAuthenticate); |
44 | UserServices.AddPlugin("OpenSim.Framework.Data.DB4o.dll"); | 47 | UserServices.AddPlugin("OpenSim.Framework.Data.DB4o.dll"); |
45 | UserServer = UserServices; | 48 | UserServer = UserServices; |
46 | GridServer = SandBoxServices; | 49 | GridServer = SandBoxServices; |
@@ -52,5 +55,30 @@ namespace OpenSim.Region.Communications.Local | |||
52 | { | 55 | { |
53 | this.SandBoxServices.AddNewSession(regionHandle, login); | 56 | this.SandBoxServices.AddNewSession(regionHandle, login); |
54 | } | 57 | } |
58 | |||
59 | public void do_create(string what) | ||
60 | { | ||
61 | switch (what) | ||
62 | { | ||
63 | case "user": | ||
64 | string tempfirstname; | ||
65 | string templastname; | ||
66 | string tempMD5Passwd; | ||
67 | uint regX = 1000; | ||
68 | uint regY = 1000; | ||
69 | |||
70 | tempfirstname = MainLog.Instance.CmdPrompt("First name"); | ||
71 | templastname = MainLog.Instance.CmdPrompt("Last name"); | ||
72 | tempMD5Passwd = MainLog.Instance.PasswdPrompt("Password"); | ||
73 | regX = Convert.ToUInt32(MainLog.Instance.CmdPrompt("Start Region X")); | ||
74 | regY = Convert.ToUInt32(MainLog.Instance.CmdPrompt("Start Region Y")); | ||
75 | |||
76 | tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + ""); | ||
77 | |||
78 | this.UserServices.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); | ||
79 | break; | ||
80 | } | ||
81 | } | ||
82 | |||
55 | } | 83 | } |
56 | } | 84 | } |