diff options
Diffstat (limited to 'OpenSim/Services/HypergridService/UserAgentService.cs')
-rw-r--r-- | OpenSim/Services/HypergridService/UserAgentService.cs | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index b414aca..c65122a 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs | |||
@@ -75,6 +75,7 @@ namespace OpenSim.Services.HypergridService | |||
75 | protected static string m_GridName; | 75 | protected static string m_GridName; |
76 | 76 | ||
77 | protected static int m_LevelOutsideContacts; | 77 | protected static int m_LevelOutsideContacts; |
78 | protected static bool m_ShowDetails; | ||
78 | 79 | ||
79 | protected static bool m_BypassClientVerification; | 80 | protected static bool m_BypassClientVerification; |
80 | 81 | ||
@@ -128,6 +129,7 @@ namespace OpenSim.Services.HypergridService | |||
128 | m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(userAccountService, args); | 129 | m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(userAccountService, args); |
129 | 130 | ||
130 | m_LevelOutsideContacts = serverConfig.GetInt("LevelOutsideContacts", 0); | 131 | m_LevelOutsideContacts = serverConfig.GetInt("LevelOutsideContacts", 0); |
132 | m_ShowDetails = serverConfig.GetBoolean("ShowUserDetailsInHGProfile", true); | ||
131 | 133 | ||
132 | LoadTripPermissionsFromConfig(serverConfig, "ForeignTripsAllowed"); | 134 | LoadTripPermissionsFromConfig(serverConfig, "ForeignTripsAllowed"); |
133 | LoadDomainExceptionsFromConfig(serverConfig, "AllowExcept", m_TripsAllowedExceptions); | 135 | LoadDomainExceptionsFromConfig(serverConfig, "AllowExcept", m_TripsAllowedExceptions); |
@@ -215,7 +217,7 @@ namespace OpenSim.Services.HypergridService | |||
215 | return home; | 217 | return home; |
216 | } | 218 | } |
217 | 219 | ||
218 | public bool LoginAgentToGrid(AgentCircuitData agentCircuit, GridRegion gatekeeper, GridRegion finalDestination, bool fromLogin, out string reason) | 220 | public bool LoginAgentToGrid(GridRegion source, AgentCircuitData agentCircuit, GridRegion gatekeeper, GridRegion finalDestination, bool fromLogin, out string reason) |
219 | { | 221 | { |
220 | m_log.DebugFormat("[USER AGENT SERVICE]: Request to login user {0} {1} (@{2}) to grid {3}", | 222 | m_log.DebugFormat("[USER AGENT SERVICE]: Request to login user {0} {1} (@{2}) to grid {3}", |
221 | agentCircuit.firstname, agentCircuit.lastname, (fromLogin ? agentCircuit.IPAddress : "stored IP"), gatekeeper.ServerURI); | 223 | agentCircuit.firstname, agentCircuit.lastname, (fromLogin ? agentCircuit.IPAddress : "stored IP"), gatekeeper.ServerURI); |
@@ -274,13 +276,12 @@ namespace OpenSim.Services.HypergridService | |||
274 | m_log.DebugFormat("[USER AGENT SERVICE]: this grid: {0}, desired grid: {1}, desired region: {2}", m_GridName, gridName, region.RegionID); | 276 | m_log.DebugFormat("[USER AGENT SERVICE]: this grid: {0}, desired grid: {1}, desired region: {2}", m_GridName, gridName, region.RegionID); |
275 | 277 | ||
276 | if (m_GridName == gridName) | 278 | if (m_GridName == gridName) |
277 | success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason); | 279 | { |
280 | success = m_GatekeeperService.LoginAgent(source, agentCircuit, finalDestination, out reason); | ||
281 | } | ||
278 | else | 282 | else |
279 | { | 283 | { |
280 | success = m_GatekeeperConnector.CreateAgent(region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out myExternalIP, out reason); | 284 | success = m_GatekeeperConnector.CreateAgent(source, region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out myExternalIP, out reason); |
281 | if (success) | ||
282 | // Report them as nowhere | ||
283 | m_PresenceService.ReportAgent(agentCircuit.SessionID, UUID.Zero); | ||
284 | } | 285 | } |
285 | 286 | ||
286 | if (!success) | 287 | if (!success) |
@@ -307,10 +308,10 @@ namespace OpenSim.Services.HypergridService | |||
307 | return true; | 308 | return true; |
308 | } | 309 | } |
309 | 310 | ||
310 | public bool LoginAgentToGrid(AgentCircuitData agentCircuit, GridRegion gatekeeper, GridRegion finalDestination, out string reason) | 311 | public bool LoginAgentToGrid(GridRegion source, AgentCircuitData agentCircuit, GridRegion gatekeeper, GridRegion finalDestination, out string reason) |
311 | { | 312 | { |
312 | reason = string.Empty; | 313 | reason = string.Empty; |
313 | return LoginAgentToGrid(agentCircuit, gatekeeper, finalDestination, false, out reason); | 314 | return LoginAgentToGrid(source, agentCircuit, gatekeeper, finalDestination, false, out reason); |
314 | } | 315 | } |
315 | 316 | ||
316 | TravelingAgentInfo CreateTravelInfo(AgentCircuitData agentCircuit, GridRegion region, bool fromLogin, out TravelingAgentInfo existing) | 317 | TravelingAgentInfo CreateTravelInfo(AgentCircuitData agentCircuit, GridRegion region, bool fromLogin, out TravelingAgentInfo existing) |
@@ -572,10 +573,22 @@ namespace OpenSim.Services.HypergridService | |||
572 | 573 | ||
573 | if (account != null) | 574 | if (account != null) |
574 | { | 575 | { |
575 | info.Add("user_flags", (object)account.UserFlags); | 576 | info.Add("user_firstname", account.FirstName); |
576 | info.Add("user_created", (object)account.Created); | 577 | info.Add("user_lastname", account.LastName); |
577 | info.Add("user_title", (object)account.UserTitle); | ||
578 | info.Add("result", "success"); | 578 | info.Add("result", "success"); |
579 | |||
580 | if (m_ShowDetails) | ||
581 | { | ||
582 | info.Add("user_flags", account.UserFlags); | ||
583 | info.Add("user_created", account.Created); | ||
584 | info.Add("user_title", account.UserTitle); | ||
585 | } | ||
586 | else | ||
587 | { | ||
588 | info.Add("user_flags", 0); | ||
589 | info.Add("user_created", 0); | ||
590 | info.Add("user_title", string.Empty); | ||
591 | } | ||
579 | } | 592 | } |
580 | 593 | ||
581 | return info; | 594 | return info; |