From df624c13c98b06d57311c1d93ecbd4790553f3b3 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Thu, 22 Mar 2012 15:08:57 -0700
Subject: HG Friends: don't notify if the server isn't there.

---
 .../CoreModules/Avatar/Friends/HGStatusNotifier.cs      | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

(limited to 'OpenSim')

diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGStatusNotifier.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGStatusNotifier.cs
index 61c6a30..1fa4dd6 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/HGStatusNotifier.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGStatusNotifier.cs
@@ -48,15 +48,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
                     if (Util.ParseUniversalUserIdentifier(ids[0], out friendID, out tmp, out tmp, out tmp, out tmp))
                     {
                         string friendsServerURI = m_FriendsModule.UserManagementModule.GetUserServerURL(friendID, "FriendsServerURI");
-                        HGFriendsServicesConnector fConn = new HGFriendsServicesConnector(friendsServerURI);
+                        if (friendsServerURI != string.Empty)
+                        {
+                            HGFriendsServicesConnector fConn = new HGFriendsServicesConnector(friendsServerURI);
 
-                        List<UUID> friendsOnline = fConn.StatusNotification(ids, userID, online);
+                            List<UUID> friendsOnline = fConn.StatusNotification(ids, userID, online);
 
-                        if (online && friendsOnline.Count > 0)
-                        {
-                            IClientAPI client = m_FriendsModule.LocateClientObject(userID);
-                            if (client != null)
-                                client.SendAgentOnline(friendsOnline.ToArray());
+                            if (online && friendsOnline.Count > 0)
+                            {
+                                IClientAPI client = m_FriendsModule.LocateClientObject(userID);
+                                if (client != null)
+                                    client.SendAgentOnline(friendsOnline.ToArray());
+                            }
                         }
                     }
                 }
-- 
cgit v1.1