aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/Friends
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Friends')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs16
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs14
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/HGStatusNotifier.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs2
5 files changed, 18 insertions, 18 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
index aaa331b..7980de3 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
@@ -167,7 +167,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
167 m_Enabled = true; 167 m_Enabled = true;
168 m_log.DebugFormat("[FRIENDS MODULE]: {0} enabled.", Name); 168 m_log.DebugFormat("[FRIENDS MODULE]: {0} enabled.", Name);
169 } 169 }
170 } 170 }
171 } 171 }
172 172
173 protected virtual void InitModule(IConfigSource config) 173 protected virtual void InitModule(IConfigSource config)
@@ -570,7 +570,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
570 protected virtual void OnInstantMessage(IClientAPI client, GridInstantMessage im) 570 protected virtual void OnInstantMessage(IClientAPI client, GridInstantMessage im)
571 { 571 {
572 if ((InstantMessageDialog)im.dialog == InstantMessageDialog.FriendshipOffered) 572 if ((InstantMessageDialog)im.dialog == InstantMessageDialog.FriendshipOffered)
573 { 573 {
574 // we got a friendship offer 574 // we got a friendship offer
575 UUID principalID = new UUID(im.fromAgentID); 575 UUID principalID = new UUID(im.fromAgentID);
576 UUID friendID = new UUID(im.toAgentID); 576 UUID friendID = new UUID(im.toAgentID);
@@ -605,7 +605,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
605 im.imSessionID = im.fromAgentID; 605 im.imSessionID = im.fromAgentID;
606 im.fromAgentName = GetFriendshipRequesterName(agentID); 606 im.fromAgentName = GetFriendshipRequesterName(agentID);
607 607
608 // Try the local sim 608 // Try the local sim
609 if (LocalFriendshipOffered(friendID, im)) 609 if (LocalFriendshipOffered(friendID, im))
610 return true; 610 return true;
611 611
@@ -648,7 +648,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
648 ccm.CreateCallingCard(client.AgentId, friendID, UUID.Zero); 648 ccm.CreateCallingCard(client.AgentId, friendID, UUID.Zero);
649 } 649 }
650 650
651 // Update the local cache. 651 // Update the local cache.
652 RecacheFriends(client); 652 RecacheFriends(client);
653 653
654 // 654 //
@@ -704,7 +704,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
704 } 704 }
705 } 705 }
706 } 706 }
707 707
708 public void RemoveFriendship(IClientAPI client, UUID exfriendID) 708 public void RemoveFriendship(IClientAPI client, UUID exfriendID)
709 { 709 {
710 if (!DeleteFriendship(client.AgentId, exfriendID)) 710 if (!DeleteFriendship(client.AgentId, exfriendID))
@@ -732,7 +732,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
732 GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID); 732 GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID);
733 m_FriendsSimConnector.FriendshipTerminated(region, client.AgentId, exfriendID); 733 m_FriendsSimConnector.FriendshipTerminated(region, client.AgentId, exfriendID);
734 } 734 }
735 } 735 }
736 } 736 }
737 737
738 public void FindFriend(IClientAPI remoteClient,UUID HunterID ,UUID PreyID) 738 public void FindFriend(IClientAPI remoteClient,UUID HunterID ,UUID PreyID)
@@ -740,7 +740,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
740 UUID requester = remoteClient.AgentId; 740 UUID requester = remoteClient.AgentId;
741 if(requester != HunterID) // only allow client agent to be the hunter (?) 741 if(requester != HunterID) // only allow client agent to be the hunter (?)
742 return; 742 return;
743 743
744 FriendInfo[] friends = GetFriendsFromCache(requester); 744 FriendInfo[] friends = GetFriendsFromCache(requester);
745 if (friends.Length == 0) 745 if (friends.Length == 0)
746 return; 746 return;
@@ -773,7 +773,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
773 } 773 }
774 774
775 PresenceInfo[] friendSessions = PresenceService.GetAgents(new string[] { PreyID.ToString() }); 775 PresenceInfo[] friendSessions = PresenceService.GetAgents(new string[] { PreyID.ToString() });
776 776
777 if (friendSessions == null || friendSessions.Length == 0) 777 if (friendSessions == null || friendSessions.Length == 0)
778 return; 778 return;
779 779
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs
index c421740..81aa882 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs
@@ -127,7 +127,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
127 UserAccount account = m_FriendsModule.UserAccountService.GetUserAccount(UUID.Zero, fromID); 127 UserAccount account = m_FriendsModule.UserAccountService.GetUserAccount(UUID.Zero, fromID);
128 string name = (account == null) ? "Unknown" : account.FirstName + " " + account.LastName; 128 string name = (account == null) ? "Unknown" : account.FirstName + " " + account.LastName;
129 129
130 GridInstantMessage im = new GridInstantMessage(m_FriendsModule.Scene, fromID, name, toID, 130 GridInstantMessage im = new GridInstantMessage(m_FriendsModule.Scene, fromID, name, toID,
131 (byte)InstantMessageDialog.FriendshipOffered, message, false, Vector3.Zero); 131 (byte)InstantMessageDialog.FriendshipOffered, message, false, Vector3.Zero);
132 132
133 // !! HACK 133 // !! HACK
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
index 9954749..ac05a6e 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
@@ -539,8 +539,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
539 // m_log.DebugFormat("[HGFRIENDS MODULE] HG Friendship! thisUUI={0}; friendUUI={1}; foreignThisFriendService={2}; foreignFriendFriendService={3}", 539 // m_log.DebugFormat("[HGFRIENDS MODULE] HG Friendship! thisUUI={0}; friendUUI={1}; foreignThisFriendService={2}; foreignFriendFriendService={3}",
540 // agentUUI, friendUUI, agentFriendService, friendFriendService); 540 // agentUUI, friendUUI, agentFriendService, friendFriendService);
541 541
542 } 542 }
543 543
544 // Delete any previous friendship relations 544 // Delete any previous friendship relations
545 DeletePreviousRelations(agentID, friendID); 545 DeletePreviousRelations(agentID, friendID);
546 546
@@ -641,11 +641,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
641 FriendsService.Delete(a1, f.Friend); 641 FriendsService.Delete(a1, f.Friend);
642 // and also the converse 642 // and also the converse
643 FriendsService.Delete(f.Friend, a1.ToString()); 643 FriendsService.Delete(f.Friend, a1.ToString());
644 } 644 }
645 } 645 }
646 } 646 }
647 } 647 }
648 648
649 finfos = GetFriendsFromCache(a1); 649 finfos = GetFriendsFromCache(a1);
650 if (finfos != null) 650 if (finfos != null)
651 { 651 {
@@ -658,7 +658,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
658 FriendsService.Delete(a2, f.Friend); 658 FriendsService.Delete(a2, f.Friend);
659 // and also the converse 659 // and also the converse
660 FriendsService.Delete(f.Friend, a2.ToString()); 660 FriendsService.Delete(f.Friend, a2.ToString());
661 } 661 }
662 } 662 }
663 } 663 }
664 } 664 }
@@ -783,7 +783,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
783 m_log.DebugFormat("[HGFRIENDS MODULE]: Forwading friendship from {0} to {1} @ {2}", agentID, friendID, friendsURL); 783 m_log.DebugFormat("[HGFRIENDS MODULE]: Forwading friendship from {0} to {1} @ {2}", agentID, friendID, friendsURL);
784 GridRegion region = new GridRegion(); 784 GridRegion region = new GridRegion();
785 region.ServerURI = friendsURL; 785 region.ServerURI = friendsURL;
786 786
787 string name = im.fromAgentName; 787 string name = im.fromAgentName;
788 if (m_uMan.IsLocalGridUser(agentID)) 788 if (m_uMan.IsLocalGridUser(agentID))
789 { 789 {
@@ -815,7 +815,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
815 } 815 }
816 816
817 m_HGFriendsConnector.FriendshipOffered(region, agentID, friendID, im.message, name); 817 m_HGFriendsConnector.FriendshipOffered(region, agentID, friendID, im.message, name);
818 818
819 return true; 819 return true;
820 } 820 }
821 } 821 }
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGStatusNotifier.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGStatusNotifier.cs
index 1fa4dd6..3fae271 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/HGStatusNotifier.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGStatusNotifier.cs
@@ -32,7 +32,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
32 { 32 {
33 if (kvp.Key != "local") 33 if (kvp.Key != "local")
34 { 34 {
35 // For the others, call the user agent service 35 // For the others, call the user agent service
36 List<string> ids = new List<string>(); 36 List<string> ids = new List<string>();
37 foreach (FriendInfo f in kvp.Value) 37 foreach (FriendInfo f in kvp.Value)
38 ids.Add(f.Friend); 38 ids.Add(f.Friend);
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs
index e6fd54e..3d9bd35 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs
@@ -67,7 +67,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends.Tests
67 // so that different services and simulator can share the data in standalone mode. This is pretty horrible 67 // so that different services and simulator can share the data in standalone mode. This is pretty horrible
68 // effectively the statics are global variables. 68 // effectively the statics are global variables.
69 NullFriendsData.Clear(); 69 NullFriendsData.Clear();
70 70
71 IConfigSource config = new IniConfigSource(); 71 IConfigSource config = new IniConfigSource();
72 config.AddConfig("Modules"); 72 config.AddConfig("Modules");
73 // Not strictly necessary since FriendsModule assumes it is the default (!) 73 // Not strictly necessary since FriendsModule assumes it is the default (!)