diff options
Merge branch 'grid-service-redux'
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs index ebd9a72..ad05bab 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs | |||
@@ -35,6 +35,7 @@ using OpenMetaverse; | |||
35 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
36 | using OpenSim.Region.Framework.Interfaces; | 36 | using OpenSim.Region.Framework.Interfaces; |
37 | using OpenSim.Region.Framework.Scenes; | 37 | using OpenSim.Region.Framework.Scenes; |
38 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | ||
38 | 39 | ||
39 | namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | 40 | namespace OpenSim.Region.CoreModules.Avatar.InstantMessage |
40 | { | 41 | { |
@@ -171,7 +172,10 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
171 | { | 172 | { |
172 | // TODO this is the old messaging-server protocol; only the regionHandle is available. | 173 | // TODO this is the old messaging-server protocol; only the regionHandle is available. |
173 | // Fetch region-info to get the id | 174 | // Fetch region-info to get the id |
174 | RegionInfo regionInfo = m_initialScene.RequestNeighbouringRegionInfo(info.regionHandle); | 175 | uint x = 0, y = 0; |
176 | Utils.LongToUInts(info.regionHandle, out x, out y); | ||
177 | GridRegion regionInfo = m_initialScene.GridService.GetRegionByPosition(m_initialScene.RegionInfo.ScopeID, | ||
178 | (int)x, (int)y); | ||
175 | regionID = regionInfo.RegionID; | 179 | regionID = regionInfo.RegionID; |
176 | } | 180 | } |
177 | result[indices[i]] = new PresenceInfo(uuids[i], regionID); | 181 | result[indices[i]] = new PresenceInfo(uuids[i], regionID); |
@@ -349,6 +353,9 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
349 | 353 | ||
350 | private void NotifyMessageServerOfShutdown(Scene scene) | 354 | private void NotifyMessageServerOfShutdown(Scene scene) |
351 | { | 355 | { |
356 | if (m_Scenes[0].CommsManager.NetworkServersInfo.MessagingURL == string.Empty) | ||
357 | return; | ||
358 | |||
352 | Hashtable xmlrpcdata = new Hashtable(); | 359 | Hashtable xmlrpcdata = new Hashtable(); |
353 | xmlrpcdata["RegionUUID"] = scene.RegionInfo.RegionID.ToString(); | 360 | xmlrpcdata["RegionUUID"] = scene.RegionInfo.RegionID.ToString(); |
354 | ArrayList SendParams = new ArrayList(); | 361 | ArrayList SendParams = new ArrayList(); |
@@ -372,6 +379,9 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
372 | 379 | ||
373 | private void NotifyMessageServerOfAgentLocation(UUID agentID, UUID region, ulong regionHandle) | 380 | private void NotifyMessageServerOfAgentLocation(UUID agentID, UUID region, ulong regionHandle) |
374 | { | 381 | { |
382 | if (m_Scenes[0].CommsManager.NetworkServersInfo.MessagingURL == string.Empty) | ||
383 | return; | ||
384 | |||
375 | Hashtable xmlrpcdata = new Hashtable(); | 385 | Hashtable xmlrpcdata = new Hashtable(); |
376 | xmlrpcdata["AgentID"] = agentID.ToString(); | 386 | xmlrpcdata["AgentID"] = agentID.ToString(); |
377 | xmlrpcdata["RegionUUID"] = region.ToString(); | 387 | xmlrpcdata["RegionUUID"] = region.ToString(); |
@@ -397,6 +407,9 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
397 | 407 | ||
398 | private void NotifyMessageServerOfAgentLeaving(UUID agentID, UUID region, ulong regionHandle) | 408 | private void NotifyMessageServerOfAgentLeaving(UUID agentID, UUID region, ulong regionHandle) |
399 | { | 409 | { |
410 | if (m_Scenes[0].CommsManager.NetworkServersInfo.MessagingURL == string.Empty) | ||
411 | return; | ||
412 | |||
400 | Hashtable xmlrpcdata = new Hashtable(); | 413 | Hashtable xmlrpcdata = new Hashtable(); |
401 | xmlrpcdata["AgentID"] = agentID.ToString(); | 414 | xmlrpcdata["AgentID"] = agentID.ToString(); |
402 | xmlrpcdata["RegionUUID"] = region.ToString(); | 415 | xmlrpcdata["RegionUUID"] = region.ToString(); |