diff options
Diffstat (limited to 'OpenSim/Services/HypergridService')
-rw-r--r-- | OpenSim/Services/HypergridService/UserAgentService.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index cdc560c..f681df4 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs | |||
@@ -161,6 +161,14 @@ namespace OpenSim.Services.HypergridService | |||
161 | { | 161 | { |
162 | m_log.DebugFormat("[USER AGENT SERVICE]: Request to login user {0} {1} (@{2}) to grid {3}", | 162 | m_log.DebugFormat("[USER AGENT SERVICE]: Request to login user {0} {1} (@{2}) to grid {3}", |
163 | agentCircuit.firstname, agentCircuit.lastname, ((clientIP == null) ? "stored IP" : clientIP.Address.ToString()), gatekeeper.ServerURI); | 163 | agentCircuit.firstname, agentCircuit.lastname, ((clientIP == null) ? "stored IP" : clientIP.Address.ToString()), gatekeeper.ServerURI); |
164 | |||
165 | if (m_UserAccountService.GetUserAccount(UUID.Zero, agentCircuit.AgentID) == null) | ||
166 | { | ||
167 | m_log.WarnFormat("[USER AGENT SERVICE]: Someone attempted to lauch a foreign user from here {0} {1}", agentCircuit.firstname, agentCircuit.lastname); | ||
168 | reason = "Forbidden to launch your agents from here"; | ||
169 | return false; | ||
170 | } | ||
171 | |||
164 | // Take the IP address + port of the gatekeeper (reg) plus the info of finalDestination | 172 | // Take the IP address + port of the gatekeeper (reg) plus the info of finalDestination |
165 | GridRegion region = new GridRegion(gatekeeper); | 173 | GridRegion region = new GridRegion(gatekeeper); |
166 | region.ServerURI = gatekeeper.ServerURI; | 174 | region.ServerURI = gatekeeper.ServerURI; |
@@ -480,6 +488,31 @@ namespace OpenSim.Services.HypergridService | |||
480 | return online; | 488 | return online; |
481 | } | 489 | } |
482 | 490 | ||
491 | public Dictionary<string, object> GetUserInfo(UUID userID) | ||
492 | { | ||
493 | Dictionary<string, object> info = new Dictionary<string, object>(); | ||
494 | |||
495 | if (m_UserAccountService == null) | ||
496 | { | ||
497 | m_log.WarnFormat("[USER AGENT SERVICE]: Unable to get user flags because user account service is missing"); | ||
498 | info["result"] = "fail"; | ||
499 | info["message"] = "UserAccountService is missing!"; | ||
500 | return info; | ||
501 | } | ||
502 | |||
503 | UserAccount account = m_UserAccountService.GetUserAccount(UUID.Zero /*!!!*/, userID); | ||
504 | |||
505 | if (account != null) | ||
506 | { | ||
507 | info.Add("user_flags", (object)account.UserFlags); | ||
508 | info.Add("user_created", (object)account.Created); | ||
509 | info.Add("user_title", (object)account.UserTitle); | ||
510 | info.Add("result", "success"); | ||
511 | } | ||
512 | |||
513 | return info; | ||
514 | } | ||
515 | |||
483 | public Dictionary<string, object> GetServerURLs(UUID userID) | 516 | public Dictionary<string, object> GetServerURLs(UUID userID) |
484 | { | 517 | { |
485 | if (m_UserAccountService == null) | 518 | if (m_UserAccountService == null) |