diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Communications/Local/LocalLoginService.cs | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index 1781ef8..966fdd4 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs | |||
@@ -41,7 +41,7 @@ namespace OpenSim.Region.Communications.Local | |||
41 | 41 | ||
42 | public class LocalLoginService : LoginService | 42 | public class LocalLoginService : LoginService |
43 | { | 43 | { |
44 | private static readonly ILog m_log | 44 | private static readonly ILog m_log |
45 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 45 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
46 | 46 | ||
47 | private CommunicationsLocal m_Parent; | 47 | private CommunicationsLocal m_Parent; |
@@ -55,8 +55,8 @@ namespace OpenSim.Region.Communications.Local | |||
55 | 55 | ||
56 | private LoginToRegionEvent handlerLoginToRegion = null; // OnLoginToRegion; | 56 | private LoginToRegionEvent handlerLoginToRegion = null; // OnLoginToRegion; |
57 | 57 | ||
58 | public LocalLoginService(UserManagerBase userManager, string welcomeMess, | 58 | public LocalLoginService(UserManagerBase userManager, string welcomeMess, |
59 | CommunicationsLocal parent, NetworkServersInfo serversInfo, | 59 | CommunicationsLocal parent, NetworkServersInfo serversInfo, |
60 | bool authenticate) | 60 | bool authenticate) |
61 | : base(userManager, parent.UserProfileCacheService.libraryRoot, welcomeMess) | 61 | : base(userManager, parent.UserProfileCacheService.libraryRoot, welcomeMess) |
62 | { | 62 | { |
@@ -106,7 +106,7 @@ namespace OpenSim.Region.Communications.Local | |||
106 | { | 106 | { |
107 | m_log.Info( | 107 | m_log.Info( |
108 | "[LOGIN]: Authenticating " + profile.FirstName + " " + profile.SurName); | 108 | "[LOGIN]: Authenticating " + profile.FirstName + " " + profile.SurName); |
109 | 109 | ||
110 | if (!password.StartsWith("$1$")) | 110 | if (!password.StartsWith("$1$")) |
111 | password = "$1$" + Util.Md5Hash(password); | 111 | password = "$1$" + Util.Md5Hash(password); |
112 | 112 | ||
@@ -157,7 +157,7 @@ namespace OpenSim.Region.Communications.Local | |||
157 | RegionInfo r = m_Parent.GridService.RequestClosestRegion(region); | 157 | RegionInfo r = m_Parent.GridService.RequestClosestRegion(region); |
158 | if (null == r) | 158 | if (null == r) |
159 | { | 159 | { |
160 | m_log.InfoFormat("[LOGIN]: Got Custom Login URL {0}, can't locate region {1}", | 160 | m_log.InfoFormat("[LOGIN]: Got Custom Login URL {0}, can't locate region {1}", |
161 | startLocationRequest, region); | 161 | startLocationRequest, region); |
162 | } | 162 | } |
163 | else | 163 | else |
@@ -176,16 +176,16 @@ namespace OpenSim.Region.Communications.Local | |||
176 | 176 | ||
177 | if ((homeReg != null) && (reg != null)) | 177 | if ((homeReg != null) && (reg != null)) |
178 | { | 178 | { |
179 | response.Home = "{'region_handle':[r" + | 179 | response.Home = "{'region_handle':[r" + |
180 | (homeReg.RegionLocX * Constants.RegionSize).ToString() + ",r" + | 180 | (homeReg.RegionLocX * Constants.RegionSize).ToString() + ",r" + |
181 | (homeReg.RegionLocY * Constants.RegionSize).ToString() + "], " + | 181 | (homeReg.RegionLocY * Constants.RegionSize).ToString() + "], " + |
182 | "'position':[r" + | 182 | "'position':[r" + |
183 | theUser.HomeLocation.X.ToString() + ",r" + | 183 | theUser.HomeLocation.X.ToString() + ",r" + |
184 | theUser.HomeLocation.Y.ToString() + ",r" + | 184 | theUser.HomeLocation.Y.ToString() + ",r" + |
185 | theUser.HomeLocation.Z.ToString() + "], " + | 185 | theUser.HomeLocation.Z.ToString() + "], " + |
186 | "'look_at':[r" + | 186 | "'look_at':[r" + |
187 | theUser.HomeLocation.X.ToString() + ",r" + | 187 | theUser.HomeLocation.X.ToString() + ",r" + |
188 | theUser.HomeLocation.Y.ToString() + ",r" + | 188 | theUser.HomeLocation.Y.ToString() + ",r" + |
189 | theUser.HomeLocation.Z.ToString() + "]}"; | 189 | theUser.HomeLocation.Z.ToString() + "]}"; |
190 | string capsPath = Util.GetRandomCapsPath(); | 190 | string capsPath = Util.GetRandomCapsPath(); |
191 | response.SimAddress = reg.ExternalEndPoint.Address.ToString(); | 191 | response.SimAddress = reg.ExternalEndPoint.Address.ToString(); |
@@ -201,17 +201,17 @@ namespace OpenSim.Region.Communications.Local | |||
201 | 201 | ||
202 | response.SeedCapability = "http://" + reg.ExternalHostName + ":" + | 202 | response.SeedCapability = "http://" + reg.ExternalHostName + ":" + |
203 | serversInfo.HttpListenerPort.ToString() + "/CAPS/" + capsPath + "0000/"; | 203 | serversInfo.HttpListenerPort.ToString() + "/CAPS/" + capsPath + "0000/"; |
204 | 204 | ||
205 | m_log.DebugFormat( | 205 | m_log.DebugFormat( |
206 | "[CAPS]: Sending new CAPS seed url {0} to client {1}", | 206 | "[CAPS]: Sending new CAPS seed url {0} to client {1}", |
207 | response.SeedCapability, response.AgentID); | 207 | response.SeedCapability, response.AgentID); |
208 | 208 | ||
209 | theUser.CurrentAgent.Region = reg.RegionID; | 209 | theUser.CurrentAgent.Region = reg.RegionID; |
210 | theUser.CurrentAgent.Handle = reg.RegionHandle; | 210 | theUser.CurrentAgent.Handle = reg.RegionHandle; |
211 | 211 | ||
212 | LoginResponse.BuddyList buddyList = new LoginResponse.BuddyList(); | 212 | LoginResponse.BuddyList buddyList = new LoginResponse.BuddyList(); |
213 | 213 | ||
214 | response.BuddList = ConvertFriendListItem(m_userManager.GetUserFriendList(theUser.ID)); | 214 | response.BuddList = ConvertFriendListItem(m_userManager.GetUserFriendList(theUser.ID)); |
215 | 215 | ||
216 | Login _login = new Login(); | 216 | Login _login = new Login(); |
217 | //copy data to login object | 217 | //copy data to login object |
@@ -228,9 +228,9 @@ namespace OpenSim.Region.Communications.Local | |||
228 | _login.CapsPath = capsPath; | 228 | _login.CapsPath = capsPath; |
229 | 229 | ||
230 | m_log.InfoFormat( | 230 | m_log.InfoFormat( |
231 | "[LOGIN]: Telling region {0} @ {1},{2} ({3}:{4}) to expect user connection", | 231 | "[LOGIN]: Telling region {0} @ {1},{2} ({3}:{4}) to expect user connection", |
232 | reg.RegionName, response.RegionX, response.RegionY, response.SimAddress, response.SimPort); | 232 | reg.RegionName, response.RegionX, response.RegionY, response.SimAddress, response.SimPort); |
233 | 233 | ||
234 | handlerLoginToRegion = OnLoginToRegion; | 234 | handlerLoginToRegion = OnLoginToRegion; |
235 | if (handlerLoginToRegion != null) | 235 | if (handlerLoginToRegion != null) |
236 | { | 236 | { |
@@ -257,7 +257,7 @@ namespace OpenSim.Region.Communications.Local | |||
257 | return buddylistreturn; | 257 | return buddylistreturn; |
258 | } | 258 | } |
259 | 259 | ||
260 | // See LoginService | 260 | // See LoginService |
261 | protected override InventoryData GetInventorySkeleton(LLUUID userID) | 261 | protected override InventoryData GetInventorySkeleton(LLUUID userID) |
262 | { | 262 | { |
263 | List<InventoryFolderBase> folders = m_Parent.InventoryService.GetInventorySkeleton(userID); | 263 | List<InventoryFolderBase> folders = m_Parent.InventoryService.GetInventorySkeleton(userID); |
@@ -265,10 +265,10 @@ namespace OpenSim.Region.Communications.Local | |||
265 | // If we have user auth but no inventory folders for some reason, create a new set of folders. | 265 | // If we have user auth but no inventory folders for some reason, create a new set of folders. |
266 | if (null == folders || 0 == folders.Count) | 266 | if (null == folders || 0 == folders.Count) |
267 | { | 267 | { |
268 | m_Parent.InventoryService.CreateNewUserInventory(userID); | 268 | m_Parent.InventoryService.CreateNewUserInventory(userID); |
269 | folders = m_Parent.InventoryService.GetInventorySkeleton(userID); | 269 | folders = m_Parent.InventoryService.GetInventorySkeleton(userID); |
270 | } | 270 | } |
271 | 271 | ||
272 | LLUUID rootID = LLUUID.Zero; | 272 | LLUUID rootID = LLUUID.Zero; |
273 | ArrayList AgentInventoryArray = new ArrayList(); | 273 | ArrayList AgentInventoryArray = new ArrayList(); |
274 | Hashtable TempHash; | 274 | Hashtable TempHash; |
@@ -286,7 +286,7 @@ namespace OpenSim.Region.Communications.Local | |||
286 | TempHash["folder_id"] = InvFolder.ID.ToString(); | 286 | TempHash["folder_id"] = InvFolder.ID.ToString(); |
287 | AgentInventoryArray.Add(TempHash); | 287 | AgentInventoryArray.Add(TempHash); |
288 | } | 288 | } |
289 | 289 | ||
290 | return new InventoryData(AgentInventoryArray, rootID); | 290 | return new InventoryData(AgentInventoryArray, rootID); |
291 | } | 291 | } |
292 | } | 292 | } |