diff options
author | MW | 2007-08-28 18:09:36 +0000 |
---|---|---|
committer | MW | 2007-08-28 18:09:36 +0000 |
commit | 31b895681aa4ab5874ac68d69a95fe6f9c834879 (patch) | |
tree | ff584ff086d6fc0e1ee8aebfb2036d241e4371a7 /OpenSim/Region | |
parent | use order by ParentID to ensure root prims are selected first (diff) | |
download | opensim-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 '')
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Communications/Local/CommunicationsLocal.cs | 33 |
2 files changed, 25 insertions, 12 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 8377d84..af21a81 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -52,7 +52,7 @@ using OpenSim.Framework.Utilities; | |||
52 | 52 | ||
53 | namespace OpenSim | 53 | namespace OpenSim |
54 | { | 54 | { |
55 | public delegate void ConsoleCommand(string comParams); | 55 | public delegate void ConsoleCommand(string[] comParams); |
56 | 56 | ||
57 | public class OpenSimMain : RegionApplicationBase, conscmd_callback | 57 | public class OpenSimMain : RegionApplicationBase, conscmd_callback |
58 | { | 58 | { |
@@ -455,7 +455,7 @@ namespace OpenSim | |||
455 | case "create": | 455 | case "create": |
456 | if (CreateAccount != null) | 456 | if (CreateAccount != null) |
457 | { | 457 | { |
458 | CreateAccount(cmdparams[0]); | 458 | CreateAccount(cmdparams); |
459 | } | 459 | } |
460 | break; | 460 | break; |
461 | 461 | ||
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 | ||