diff options
Diffstat (limited to 'OpenSim/Services/HypergridService')
-rw-r--r-- | OpenSim/Services/HypergridService/UserAgentService.cs | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index 26f211b..3af7ef9 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs | |||
@@ -59,7 +59,7 @@ namespace OpenSim.Services.HypergridService | |||
59 | 59 | ||
60 | static bool m_Initialized = false; | 60 | static bool m_Initialized = false; |
61 | 61 | ||
62 | protected static IPresenceService m_PresenceService; | 62 | protected static IGridUserService m_GridUserService; |
63 | protected static IGridService m_GridService; | 63 | protected static IGridService m_GridService; |
64 | protected static GatekeeperServiceConnector m_GatekeeperConnector; | 64 | protected static GatekeeperServiceConnector m_GatekeeperConnector; |
65 | 65 | ||
@@ -74,14 +74,14 @@ namespace OpenSim.Services.HypergridService | |||
74 | throw new Exception(String.Format("No section UserAgentService in config file")); | 74 | throw new Exception(String.Format("No section UserAgentService in config file")); |
75 | 75 | ||
76 | string gridService = serverConfig.GetString("GridService", String.Empty); | 76 | string gridService = serverConfig.GetString("GridService", String.Empty); |
77 | string presenceService = serverConfig.GetString("PresenceService", String.Empty); | 77 | string gridUserService = serverConfig.GetString("GridUserService", String.Empty); |
78 | 78 | ||
79 | if (gridService == string.Empty || presenceService == string.Empty) | 79 | if (gridService == string.Empty || gridUserService == string.Empty) |
80 | throw new Exception(String.Format("Incomplete specifications, UserAgent Service cannot function.")); | 80 | throw new Exception(String.Format("Incomplete specifications, UserAgent Service cannot function.")); |
81 | 81 | ||
82 | Object[] args = new Object[] { config }; | 82 | Object[] args = new Object[] { config }; |
83 | m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args); | 83 | m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args); |
84 | m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args); | 84 | m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args); |
85 | m_GatekeeperConnector = new GatekeeperServiceConnector(); | 85 | m_GatekeeperConnector = new GatekeeperServiceConnector(); |
86 | 86 | ||
87 | m_Initialized = true; | 87 | m_Initialized = true; |
@@ -95,15 +95,14 @@ namespace OpenSim.Services.HypergridService | |||
95 | m_log.DebugFormat("[USER AGENT SERVICE]: Request to get home region of user {0}", userID); | 95 | m_log.DebugFormat("[USER AGENT SERVICE]: Request to get home region of user {0}", userID); |
96 | 96 | ||
97 | GridRegion home = null; | 97 | GridRegion home = null; |
98 | PresenceInfo[] presences = m_PresenceService.GetAgents(new string[] { userID.ToString() }); | 98 | GridUserInfo uinfo = m_GridUserService.GetGridUserInfo(userID.ToString()); |
99 | if (presences != null && presences.Length > 0) | 99 | if (uinfo != null) |
100 | { | 100 | { |
101 | UUID homeID = presences[0].HomeRegionID; | 101 | if (uinfo.HomeRegionID != UUID.Zero) |
102 | if (homeID != UUID.Zero) | ||
103 | { | 102 | { |
104 | home = m_GridService.GetRegionByUUID(UUID.Zero, homeID); | 103 | home = m_GridService.GetRegionByUUID(UUID.Zero, uinfo.HomeRegionID); |
105 | position = presences[0].HomePosition; | 104 | position = uinfo.HomePosition; |
106 | lookAt = presences[0].HomeLookAt; | 105 | lookAt = uinfo.HomeLookAt; |
107 | } | 106 | } |
108 | if (home == null) | 107 | if (home == null) |
109 | { | 108 | { |