From 38e8853e5761d09a7e8f580dd277d9b99b834696 Mon Sep 17 00:00:00 2001 From: Homer Horwitz Date: Sat, 1 Nov 2008 22:09:48 +0000 Subject: Megapatch that fixes/adds: friend offer/deny/accept, friendship termination, on-/offline updates, calling cards for friends. This adds methods in the DB layer and changes the MessagingServer, so a full update (incl. UGAIM) is necessary to get it working. Older regions shouldn't break, nor should older UGAIM break newer regions, but friends/presence will only work with all concerned parts (UGAIM, source region and destination region) at this revision (or later). I added the DB code for MSSQL, too, but couldn't test that. BEWARE: May contain bugs. --- .../Communications/Local/CommunicationsLocal.cs | 4 +++- .../Communications/Local/LocalBackEndServices.cs | 24 ++++++++++++++++++---- 2 files changed, 23 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Communications/Local') diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs index 71c44e5..48a635a 100644 --- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs +++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs @@ -42,7 +42,8 @@ namespace OpenSim.Region.Communications.Local IUserServiceAdmin userServiceAdmin, LocalInventoryService inventoryService, IInterRegionCommunications interRegionService, - IGridServices gridService, LibraryRootFolder libraryRootFolder, bool dumpAssetsToFile) + IGridServices gridService, IMessagingService messageService, + LibraryRootFolder libraryRootFolder, bool dumpAssetsToFile) : base(serversInfo, httpServer, assetCache, dumpAssetsToFile, libraryRootFolder) { AddInventoryService(inventoryService); @@ -53,6 +54,7 @@ namespace OpenSim.Region.Communications.Local m_avatarService = (IAvatarService)userService; m_gridService = gridService; m_interRegion = interRegionService; + m_messageService = messageService; } } } diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs index 9034e49..4980378 100644 --- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs +++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs @@ -39,7 +39,7 @@ namespace OpenSim.Region.Communications.Local public class LocalBackEndServices : IGridServices, IInterRegionCommunications { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - + protected Dictionary m_regions = new Dictionary(); protected Dictionary m_regionListeners = @@ -50,7 +50,7 @@ namespace OpenSim.Region.Communications.Local private Dictionary m_queuedGridSettings = new Dictionary(); public string _gdebugRegionName = String.Empty; - + public bool RegionLoginsEnabled { get { return m_regionLoginsEnabled; } @@ -523,11 +523,27 @@ namespace OpenSim.Region.Communications.Local if (info.RegionName.StartsWith(name)) { regions.Add(info); - if (regions.Count >= maxNumber) break; + if (regions.Count >= maxNumber) break; } } - + return regions; } + + public List InformFriendsInOtherRegion(UUID agentId, ulong destRegionHandle, List friends, bool online) + { + // if we get to here, something is wrong: We are in standalone mode, but have users that are not on our server? + m_log.WarnFormat("[INTERREGION STANDALONE] Did find {0} users on a region not on our server: {1} ???", + friends.Count, destRegionHandle); + return new List(); + } + + public bool TriggerTerminateFriend (ulong regionHandle, UUID agentID, UUID exFriendID) + { + // if we get to here, something is wrong: We are in standalone mode, but have users that are not on our server? + m_log.WarnFormat("[INTERREGION STANDALONE] Did find user {0} on a region not on our server: {1} ???", + agentID, regionHandle); + return true; + } } } -- cgit v1.1