diff options
author | Diva Canto | 2010-02-25 16:11:04 -0800 |
---|---|---|
committer | Diva Canto | 2010-02-25 16:11:04 -0800 |
commit | 679ad9575083370204a6d83e9933323c9f60ae45 (patch) | |
tree | c2701a8f894e127a0b1ad32802bffe3374bd378c /OpenSim/Services/LLLoginService/LLLoginService.cs | |
parent | Implement initial online notifications (diff) | |
download | opensim-SC_OLD-679ad9575083370204a6d83e9933323c9f60ae45.zip opensim-SC_OLD-679ad9575083370204a6d83e9933323c9f60ae45.tar.gz opensim-SC_OLD-679ad9575083370204a6d83e9933323c9f60ae45.tar.bz2 opensim-SC_OLD-679ad9575083370204a6d83e9933323c9f60ae45.tar.xz |
List of friends now retrieved upon login. Configured and tested in standalone only.
Diffstat (limited to 'OpenSim/Services/LLLoginService/LLLoginService.cs')
-rw-r--r-- | OpenSim/Services/LLLoginService/LLLoginService.cs | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index ba50e3f..143e5f1 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -14,6 +14,7 @@ using OpenSim.Framework.Console; | |||
14 | using OpenSim.Server.Base; | 14 | using OpenSim.Server.Base; |
15 | using OpenSim.Services.Interfaces; | 15 | using OpenSim.Services.Interfaces; |
16 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | 16 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; |
17 | using FriendInfo = OpenSim.Services.Interfaces.FriendInfo; | ||
17 | using OpenSim.Services.Connectors.Hypergrid; | 18 | using OpenSim.Services.Connectors.Hypergrid; |
18 | 19 | ||
19 | namespace OpenSim.Services.LLLoginService | 20 | namespace OpenSim.Services.LLLoginService |
@@ -31,6 +32,7 @@ namespace OpenSim.Services.LLLoginService | |||
31 | private ISimulationService m_LocalSimulationService; | 32 | private ISimulationService m_LocalSimulationService; |
32 | private ISimulationService m_RemoteSimulationService; | 33 | private ISimulationService m_RemoteSimulationService; |
33 | private ILibraryService m_LibraryService; | 34 | private ILibraryService m_LibraryService; |
35 | private IFriendsService m_FriendsService; | ||
34 | private IAvatarService m_AvatarService; | 36 | private IAvatarService m_AvatarService; |
35 | private IUserAgentService m_UserAgentService; | 37 | private IUserAgentService m_UserAgentService; |
36 | 38 | ||
@@ -57,6 +59,7 @@ namespace OpenSim.Services.LLLoginService | |||
57 | string gridService = m_LoginServerConfig.GetString("GridService", String.Empty); | 59 | string gridService = m_LoginServerConfig.GetString("GridService", String.Empty); |
58 | string presenceService = m_LoginServerConfig.GetString("PresenceService", String.Empty); | 60 | string presenceService = m_LoginServerConfig.GetString("PresenceService", String.Empty); |
59 | string libService = m_LoginServerConfig.GetString("LibraryService", String.Empty); | 61 | string libService = m_LoginServerConfig.GetString("LibraryService", String.Empty); |
62 | string friendsService = m_LoginServerConfig.GetString("FriendsService", String.Empty); | ||
60 | string avatarService = m_LoginServerConfig.GetString("AvatarService", String.Empty); | 63 | string avatarService = m_LoginServerConfig.GetString("AvatarService", String.Empty); |
61 | string simulationService = m_LoginServerConfig.GetString("SimulationService", String.Empty); | 64 | string simulationService = m_LoginServerConfig.GetString("SimulationService", String.Empty); |
62 | 65 | ||
@@ -79,6 +82,8 @@ namespace OpenSim.Services.LLLoginService | |||
79 | m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args); | 82 | m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args); |
80 | if (avatarService != string.Empty) | 83 | if (avatarService != string.Empty) |
81 | m_AvatarService = ServerUtils.LoadPlugin<IAvatarService>(avatarService, args); | 84 | m_AvatarService = ServerUtils.LoadPlugin<IAvatarService>(avatarService, args); |
85 | if (friendsService != string.Empty) | ||
86 | m_FriendsService = ServerUtils.LoadPlugin<IFriendsService>(friendsService, args); | ||
82 | if (simulationService != string.Empty) | 87 | if (simulationService != string.Empty) |
83 | m_RemoteSimulationService = ServerUtils.LoadPlugin<ISimulationService>(simulationService, args); | 88 | m_RemoteSimulationService = ServerUtils.LoadPlugin<ISimulationService>(simulationService, args); |
84 | if (agentService != string.Empty) | 89 | if (agentService != string.Empty) |
@@ -228,12 +233,18 @@ namespace OpenSim.Services.LLLoginService | |||
228 | return LLFailedLoginResponse.AuthorizationProblem; | 233 | return LLFailedLoginResponse.AuthorizationProblem; |
229 | 234 | ||
230 | } | 235 | } |
231 | // TODO: Get Friends list... | 236 | // Get Friends list |
237 | FriendInfo[] friendsList = new FriendInfo[0]; | ||
238 | if (m_FriendsService != null) | ||
239 | { | ||
240 | friendsList = m_FriendsService.GetFriends(account.PrincipalID); | ||
241 | m_log.DebugFormat("[LLOGIN SERVICE]: Retrieved {0} friends", friendsList.Length); | ||
242 | } | ||
232 | 243 | ||
233 | // | 244 | // |
234 | // Finally, fill out the response and return it | 245 | // Finally, fill out the response and return it |
235 | // | 246 | // |
236 | LLLoginResponse response = new LLLoginResponse(account, aCircuit, presence, destination, inventorySkel, m_LibraryService, | 247 | LLLoginResponse response = new LLLoginResponse(account, aCircuit, presence, destination, inventorySkel, friendsList, m_LibraryService, |
237 | where, startLocation, position, lookAt, m_WelcomeMessage, home, clientIP); | 248 | where, startLocation, position, lookAt, m_WelcomeMessage, home, clientIP); |
238 | 249 | ||
239 | return response; | 250 | return response; |
@@ -587,7 +598,7 @@ namespace OpenSim.Services.LLLoginService | |||
587 | 598 | ||
588 | private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, out string reason) | 599 | private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, out string reason) |
589 | { | 600 | { |
590 | m_log.Debug("XXX Launching agent at {0}" + destination.RegionName); | 601 | m_log.Debug("[LLOGIN SERVICE] Launching agent at " + destination.RegionName); |
591 | return m_UserAgentService.LoginAgentToGrid(aCircuit, gatekeeper, destination, out reason); | 602 | return m_UserAgentService.LoginAgentToGrid(aCircuit, gatekeeper, destination, out reason); |
592 | } | 603 | } |
593 | 604 | ||