aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
diff options
context:
space:
mode:
authorMW2007-08-28 18:09:36 +0000
committerMW2007-08-28 18:09:36 +0000
commit31b895681aa4ab5874ac68d69a95fe6f9c834879 (patch)
treeff584ff086d6fc0e1ee8aebfb2036d241e4371a7 /OpenSim/Region/Communications/Local/CommunicationsLocal.cs
parentuse order by ParentID to ensure root prims are selected first (diff)
downloadopensim-SC-31b895681aa4ab5874ac68d69a95fe6f9c834879.zip
opensim-SC-31b895681aa4ab5874ac68d69a95fe6f9c834879.tar.gz
opensim-SC-31b895681aa4ab5874ac68d69a95fe6f9c834879.tar.bz2
opensim-SC-31b895681aa4ab5874ac68d69a95fe6f9c834879.tar.xz
As part of our "we aim to please" commitment, have added the ability to create a user in one command line: "create user firstname secondname passwrd regionX regionY". This allows the use of the "command-script" feature. So to add a bunch of new accounts, just create a text file, and add a line as above for each account. Then in the opensim console, type: "command-script filename".
Diffstat (limited to 'OpenSim/Region/Communications/Local/CommunicationsLocal.cs')
-rw-r--r--OpenSim/Region/Communications/Local/CommunicationsLocal.cs33
1 files changed, 23 insertions, 10 deletions
diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
index 19c8860..97b2fbe 100644
--- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
+++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
@@ -43,10 +43,10 @@ namespace OpenSim.Region.Communications.Local
43 public LocalUserServices UserServices; 43 public LocalUserServices UserServices;
44 public LocalLoginService LoginServices; 44 public LocalLoginService LoginServices;
45 public LocalInventoryService InvenServices; 45 public LocalInventoryService InvenServices;
46 // public CAPSService CapsServices; 46 // public CAPSService CapsServices;
47 private LocalSettings m_settings; 47 private LocalSettings m_settings;
48 48
49 public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, LocalSettings settings ) 49 public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, LocalSettings settings)
50 : base(serversInfo, httpServer, assetCache) 50 : base(serversInfo, httpServer, assetCache)
51 { 51 {
52 m_settings = settings; 52 m_settings = settings;
@@ -64,7 +64,7 @@ namespace OpenSim.Region.Communications.Local
64 InterRegion = InstanceServices; 64 InterRegion = InstanceServices;
65 65
66 //CapsServices = new CAPSService(httpServer); 66 //CapsServices = new CAPSService(httpServer);
67 67
68 LoginServices = new LocalLoginService(UserServices, m_settings.WelcomeMessage, this, serversInfo, m_settings.AccountAuthentication); 68 LoginServices = new LocalLoginService(UserServices, m_settings.WelcomeMessage, this, serversInfo, m_settings.AccountAuthentication);
69 httpServer.AddXmlRPCHandler("login_to_simulator", LoginServices.XmlRpcLoginMethod); 69 httpServer.AddXmlRPCHandler("login_to_simulator", LoginServices.XmlRpcLoginMethod);
70 } 70 }
@@ -74,9 +74,9 @@ namespace OpenSim.Region.Communications.Local
74 this.InstanceServices.AddNewSession(regionHandle, login); 74 this.InstanceServices.AddNewSession(regionHandle, login);
75 } 75 }
76 76
77 public void doCreate(string what) 77 public void doCreate(string[] cmmdParams)
78 { 78 {
79 switch (what) 79 switch (cmmdParams[0])
80 { 80 {
81 case "user": 81 case "user":
82 string tempfirstname; 82 string tempfirstname;
@@ -85,11 +85,24 @@ namespace OpenSim.Region.Communications.Local
85 uint regX = 1000; 85 uint regX = 1000;
86 uint regY = 1000; 86 uint regY = 1000;
87 87
88 tempfirstname = MainLog.Instance.CmdPrompt("First name", "Default"); 88 if (cmmdParams.Length < 2)
89 templastname = MainLog.Instance.CmdPrompt("Last name", "User"); 89 {
90 tempMD5Passwd = MainLog.Instance.PasswdPrompt("Password"); 90
91 regX = Convert.ToUInt32(MainLog.Instance.CmdPrompt("Start Region X", "1000")); 91 tempfirstname = MainLog.Instance.CmdPrompt("First name", "Default");
92 regY = Convert.ToUInt32(MainLog.Instance.CmdPrompt("Start Region Y" , "1000")); 92 templastname = MainLog.Instance.CmdPrompt("Last name", "User");
93 tempMD5Passwd = MainLog.Instance.PasswdPrompt("Password");
94 regX = Convert.ToUInt32(MainLog.Instance.CmdPrompt("Start Region X", "1000"));
95 regY = Convert.ToUInt32(MainLog.Instance.CmdPrompt("Start Region Y", "1000"));
96 }
97 else
98 {
99 tempfirstname = cmmdParams[1];
100 templastname = cmmdParams[2];
101 tempMD5Passwd = cmmdParams[3];
102 regX = Convert.ToUInt32(cmmdParams[4]);
103 regY = Convert.ToUInt32(cmmdParams[5]);
104
105 }
93 106
94 tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + ""); 107 tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + "");
95 108