aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/InventoryServiceBase/InventoryServiceBase.cs2
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs21
-rw-r--r--OpenSim/Region/Communications/Local/CommunicationsLocal.cs47
3 files changed, 36 insertions, 34 deletions
diff --git a/OpenSim/Framework/InventoryServiceBase/InventoryServiceBase.cs b/OpenSim/Framework/InventoryServiceBase/InventoryServiceBase.cs
index 20d3a77..dc66bd4 100644
--- a/OpenSim/Framework/InventoryServiceBase/InventoryServiceBase.cs
+++ b/OpenSim/Framework/InventoryServiceBase/InventoryServiceBase.cs
@@ -1,10 +1,8 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Reflection; 3using System.Reflection;
4using System.Text;
5using libsecondlife; 4using libsecondlife;
6using OpenSim.Framework.Console; 5using OpenSim.Framework.Console;
7using OpenSim.Framework.Interfaces;
8using OpenSim.Framework.Data; 6using OpenSim.Framework.Data;
9 7
10namespace OpenSim.Framework.InventoryServiceBase 8namespace OpenSim.Framework.InventoryServiceBase
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index c1522b1..9ac5117 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -27,29 +27,22 @@
27*/ 27*/
28 28
29using System; 29using System;
30using System.Collections.Generic;
30using System.IO; 31using System.IO;
31using libsecondlife; 32using System.Text;
32using Nini.Config; 33using Nini.Config;
33using OpenSim.Framework; 34using OpenSim.Framework.Communications.Caches;
34using OpenSim.Framework.Communications;
35using OpenSim.Framework.Console; 35using OpenSim.Framework.Console;
36using OpenSim.Framework.Data;
37using OpenSim.Framework.Interfaces; 36using OpenSim.Framework.Interfaces;
38using OpenSim.Framework.Servers; 37using OpenSim.Framework.Servers;
39using OpenSim.Framework.Types; 38using OpenSim.Framework.Types;
40using OpenSim.Framework.Configuration; 39using OpenSim.Framework.Utilities;
41using OpenSim.Region.Physics.Manager;
42
43using OpenSim.Region.ClientStack; 40using OpenSim.Region.ClientStack;
44using OpenSim.Region.Communications.Local; 41using OpenSim.Region.Communications.Local;
45using OpenSim.Region.Communications.OGS1; 42using OpenSim.Region.Communications.OGS1;
46using OpenSim.Framework.Communications.Caches;
47using OpenSim.Region.Environment.Scenes;
48using OpenSim.Region.Environment.Modules;
49using OpenSim.Region.Environment; 43using OpenSim.Region.Environment;
50using System.Text; 44using OpenSim.Region.Environment.Scenes;
51using System.Collections.Generic; 45using OpenSim.Region.Physics.Manager;
52using OpenSim.Framework.Utilities;
53 46
54namespace OpenSim 47namespace OpenSim
55{ 48{
@@ -75,7 +68,7 @@ namespace OpenSim
75 protected List<Scene> m_localScenes = new List<Scene>(); 68 protected List<Scene> m_localScenes = new List<Scene>();
76 69
77 private bool m_silent; 70 private bool m_silent;
78 private string m_logFilename = ("region-console.log"); 71 private readonly string m_logFilename = ("region-console.log");
79 private bool m_permissions = false; 72 private bool m_permissions = false;
80 73
81 private bool m_DefaultModules = true; 74 private bool m_DefaultModules = true;
diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
index cf0e871..e326a1e 100644
--- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
+++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
@@ -34,6 +34,7 @@ using OpenSim.Framework.Console;
34using OpenSim.Framework.Utilities; 34using OpenSim.Framework.Utilities;
35using OpenSim.Framework.Data; 35using OpenSim.Framework.Data;
36using OpenSim.Framework.UserManagement; 36using OpenSim.Framework.UserManagement;
37using libsecondlife;
37 38
38namespace OpenSim.Region.Communications.Local 39namespace OpenSim.Region.Communications.Local
39{ 40{
@@ -79,44 +80,54 @@ namespace OpenSim.Region.Communications.Local
79 switch (cmmdParams[0]) 80 switch (cmmdParams[0])
80 { 81 {
81 case "user": 82 case "user":
82 string tempfirstname; 83 string firstName;
83 string templastname; 84 string lastName;
84 string tempMD5Passwd; 85 string password;
85 uint regX = 1000; 86 uint regX = 1000;
86 uint regY = 1000; 87 uint regY = 1000;
87 88
88 if (cmmdParams.Length < 2) 89 if (cmmdParams.Length < 2)
89 { 90 {
90 91
91 tempfirstname = MainLog.Instance.CmdPrompt("First name", "Default"); 92 firstName = MainLog.Instance.CmdPrompt("First name", "Default");
92 templastname = MainLog.Instance.CmdPrompt("Last name", "User"); 93 lastName = MainLog.Instance.CmdPrompt("Last name", "User");
93 tempMD5Passwd = MainLog.Instance.PasswdPrompt("Password"); 94 password = MainLog.Instance.PasswdPrompt("Password");
94 regX = Convert.ToUInt32(MainLog.Instance.CmdPrompt("Start Region X", "1000")); 95 regX = Convert.ToUInt32(MainLog.Instance.CmdPrompt("Start Region X", "1000"));
95 regY = Convert.ToUInt32(MainLog.Instance.CmdPrompt("Start Region Y", "1000")); 96 regY = Convert.ToUInt32(MainLog.Instance.CmdPrompt("Start Region Y", "1000"));
96 } 97 }
97 else 98 else
98 { 99 {
99 tempfirstname = cmmdParams[1]; 100 firstName = cmmdParams[1];
100 templastname = cmmdParams[2]; 101 lastName = cmmdParams[2];
101 tempMD5Passwd = cmmdParams[3]; 102 password = cmmdParams[3];
102 regX = Convert.ToUInt32(cmmdParams[4]); 103 regX = Convert.ToUInt32(cmmdParams[4]);
103 regY = Convert.ToUInt32(cmmdParams[5]); 104 regY = Convert.ToUInt32(cmmdParams[5]);
104 105
105 } 106 }
106 107
107 tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + ""); 108 AddUser(firstName, lastName, password, regX, regY);
108
109 this.UserServices.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY);
110 UserProfileData userProf = this.UserServer.GetUserProfile(tempfirstname, templastname);
111 if (userProf != null)
112 {
113 this.InvenServices.CreateNewUserInventory(userProf.UUID);
114 Console.WriteLine("Created new inventory set for " + tempfirstname + " " + templastname);
115 }
116 break; 109 break;
117 } 110 }
118 } 111 }
119 112
113 public LLUUID AddUser(string firstName, string lastName, string password, uint regX, uint regY)
114 {
115 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + "");
116
117 this.UserServices.AddUserProfile(firstName, lastName, md5PasswdHash, regX, regY);
118 UserProfileData userProf = this.UserServer.GetUserProfile(firstName, lastName);
119 if (userProf == null)
120 {
121 return LLUUID.Zero;
122 }
123 else
124 {
125 this.InvenServices.CreateNewUserInventory(userProf.UUID);
126 Console.WriteLine("Created new inventory set for " + firstName + " " + lastName);
127 return userProf.UUID;
128 }
129 }
130
120 public class LocalSettings 131 public class LocalSettings
121 { 132 {
122 public string WelcomeMessage = ""; 133 public string WelcomeMessage = "";