2 using System.Collections.Generic;
4 using System.Reflection;
6 using OpenSim.Framework;
7 using OpenSim.Region.Framework.Interfaces;
8 using OpenSim.Services.Interfaces;
9 using OpenSim.Services.Connectors.Hypergrid;
20 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
26 m_FriendsModule = friendsModule;
29 public void Notify(UUID userID, Dictionary<
string, List<FriendInfo>> friendsPerDomain,
bool online)
31 foreach (KeyValuePair<
string, List<FriendInfo>> kvp
in friendsPerDomain)
33 if (kvp.Key !=
"local")
36 List<string> ids =
new List<string>();
43 m_log.DebugFormat(
"[HG STATUS NOTIFIER]: Notifying {0} friends in {1}", ids.Count, kvp.Key);
47 UUID friendID = UUID.Zero;
String tmp = String.Empty;
48 if (Util.ParseUniversalUserIdentifier(ids[0], out friendID, out tmp, out tmp, out tmp, out tmp))
50 string friendsServerURI = m_FriendsModule.UserManagementModule.GetUserServerURL(friendID,
"FriendsServerURI");
51 if (friendsServerURI !=
string.Empty)
55 List<UUID> friendsOnline = fConn.StatusNotification(ids, userID, online);
57 if (online && friendsOnline.Count > 0)
59 IClientAPI client = m_FriendsModule.LocateClientObject(userID);
61 client.SendAgentOnline(friendsOnline.ToArray());
void Notify(UUID userID, Dictionary< string, List< FriendInfo >> friendsPerDomain, bool online)
HGStatusNotifier(HGFriendsModule friendsModule)
OpenSim.Services.Interfaces.FriendInfo FriendInfo