diff options
Switched in NameSpaceChanges
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Communications/Local/LocalUserServices.cs (renamed from OpenSim/OpenSim.LocalCommunications/LocalUserServices.cs) | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/OpenSim/OpenSim.LocalCommunications/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs index a7f7aa4..6cf254b 100644 --- a/OpenSim/OpenSim.LocalCommunications/LocalUserServices.cs +++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs | |||
@@ -3,16 +3,16 @@ using System.Collections; | |||
3 | using System.Collections.Generic; | 3 | using System.Collections.Generic; |
4 | using System.Text; | 4 | using System.Text; |
5 | 5 | ||
6 | using OpenGrid.Framework.Communications; | 6 | using OpenSim.Framework.Communications; |
7 | //using OpenSim.Framework.User; | 7 | //using OpenSim.Framework.User; |
8 | using OpenGrid.Framework.UserManagement; | 8 | using OpenSim.Framework.UserManagement; |
9 | using OpenGrid.Framework.Data; | 9 | using OpenSim.Framework.Data; |
10 | using OpenSim.Framework.Types; | 10 | using OpenSim.Framework.Types; |
11 | using OpenSim.Framework.Utilities; | 11 | using OpenSim.Framework.Utilities; |
12 | 12 | ||
13 | using libsecondlife; | 13 | using libsecondlife; |
14 | 14 | ||
15 | namespace OpenSim.LocalCommunications | 15 | namespace OpenSim.Region.Communications.Local |
16 | { | 16 | { |
17 | public class LocalUserServices : UserManagerBase, IUserServices | 17 | public class LocalUserServices : UserManagerBase, IUserServices |
18 | { | 18 | { |
@@ -36,6 +36,7 @@ namespace OpenSim.LocalCommunications | |||
36 | { | 36 | { |
37 | return this.getUserProfile(name); | 37 | return this.getUserProfile(name); |
38 | } | 38 | } |
39 | |||
39 | public UserProfileData GetUserProfile(LLUUID avatarID) | 40 | public UserProfileData GetUserProfile(LLUUID avatarID) |
40 | { | 41 | { |
41 | return this.getUserProfile(avatarID); | 42 | return this.getUserProfile(avatarID); |
@@ -87,7 +88,7 @@ namespace OpenSim.LocalCommunications | |||
87 | "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + | 88 | "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + |
88 | "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; | 89 | "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; |
89 | string capsPath = Util.GetRandomCapsPath(); | 90 | string capsPath = Util.GetRandomCapsPath(); |
90 | response.SimAddress = reg.CommsIPListenAddr; | 91 | response.SimAddress = reg.CommsExternalAddress; |
91 | response.SimPort = (Int32)reg.CommsIPListenPort; | 92 | response.SimPort = (Int32)reg.CommsIPListenPort; |
92 | response.RegionX = reg.RegionLocX ; | 93 | response.RegionX = reg.RegionLocX ; |
93 | response.RegionY = reg.RegionLocY ; | 94 | response.RegionY = reg.RegionLocY ; |
@@ -114,5 +115,31 @@ namespace OpenSim.LocalCommunications | |||
114 | 115 | ||
115 | } | 116 | } |
116 | 117 | ||
118 | public UserProfileData SetupMasterUser(string firstName, string lastName) | ||
119 | { | ||
120 | return SetupMasterUser(firstName, lastName, ""); | ||
121 | } | ||
122 | |||
123 | public UserProfileData SetupMasterUser(string firstName, string lastName, string password) | ||
124 | { | ||
125 | UserProfileData profile = getUserProfile(firstName, lastName); | ||
126 | if (profile != null) | ||
127 | { | ||
128 | |||
129 | return profile; | ||
130 | } | ||
131 | |||
132 | Console.WriteLine("Unknown Master User. Sandbox Mode: Creating Account"); | ||
133 | this.AddUserProfile(firstName, lastName, password, defaultHomeX, defaultHomeY); | ||
134 | |||
135 | profile = getUserProfile(firstName, lastName); | ||
136 | |||
137 | if (profile == null) | ||
138 | { | ||
139 | Console.WriteLine("Unknown Master User after creation attempt. No clue what to do here."); | ||
140 | } | ||
141 | |||
142 | return profile; | ||
143 | } | ||
117 | } | 144 | } |
118 | } | 145 | } |