diff options
Merge branch 'master' into diva-textures
Diffstat (limited to '')
3 files changed, 21 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs index 66f1e14..9a68749 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs | |||
@@ -38,7 +38,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
38 | { | 38 | { |
39 | public class InstantMessageModule : IRegionModule | 39 | public class InstantMessageModule : IRegionModule |
40 | { | 40 | { |
41 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 41 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
42 | 42 | ||
43 | /// <value> | 43 | /// <value> |
44 | /// Is this module enabled? | 44 | /// Is this module enabled? |
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs index 4495303..e5159b3 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs | |||
@@ -36,6 +36,7 @@ using OpenMetaverse; | |||
36 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
37 | using OpenSim.Region.Framework.Interfaces; | 37 | using OpenSim.Region.Framework.Interfaces; |
38 | using OpenSim.Region.Framework.Scenes; | 38 | using OpenSim.Region.Framework.Scenes; |
39 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | ||
39 | 40 | ||
40 | namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | 41 | namespace OpenSim.Region.CoreModules.Avatar.InstantMessage |
41 | { | 42 | { |
@@ -497,7 +498,10 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
497 | { | 498 | { |
498 | if (upd.AgentOnline) | 499 | if (upd.AgentOnline) |
499 | { | 500 | { |
500 | RegionInfo reginfo = m_Scenes[0].SceneGridService.RequestNeighbouringRegionInfo(upd.Handle); | 501 | uint x = 0, y = 0; |
502 | Utils.LongToUInts(upd.Handle, out x, out y); | ||
503 | GridRegion reginfo = m_Scenes[0].GridService.GetRegionByPosition(m_Scenes[0].RegionInfo.ScopeID, | ||
504 | (int)x, (int)y); | ||
501 | if (reginfo != null) | 505 | if (reginfo != null) |
502 | { | 506 | { |
503 | Hashtable msgdata = ConvertGridInstantMessageToXMLRPC(im); | 507 | Hashtable msgdata = ConvertGridInstantMessageToXMLRPC(im); |
@@ -559,7 +563,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
559 | /// <param name="reginfo">RegionInfo we pull the data out of to send the request to</param> | 563 | /// <param name="reginfo">RegionInfo we pull the data out of to send the request to</param> |
560 | /// <param name="xmlrpcdata">The Instant Message data Hashtable</param> | 564 | /// <param name="xmlrpcdata">The Instant Message data Hashtable</param> |
561 | /// <returns>Bool if the message was successfully delivered at the other side.</returns> | 565 | /// <returns>Bool if the message was successfully delivered at the other side.</returns> |
562 | protected virtual bool doIMSending(RegionInfo reginfo, Hashtable xmlrpcdata) | 566 | protected virtual bool doIMSending(GridRegion reginfo, Hashtable xmlrpcdata) |
563 | { | 567 | { |
564 | 568 | ||
565 | ArrayList SendParams = new ArrayList(); | 569 | ArrayList SendParams = new ArrayList(); |
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(); |