diff options
author | Jeff Ames | 2008-11-02 01:29:56 +0000 |
---|---|---|
committer | Jeff Ames | 2008-11-02 01:29:56 +0000 |
commit | 88d6557071f03f06c040cd4607a3eb7dfb105965 (patch) | |
tree | 0f9d4af2bf081eefe24a0f3e7b13f69be987fd13 /OpenSim/Region | |
parent | Mantis #2518 (diff) | |
download | opensim-SC_OLD-88d6557071f03f06c040cd4607a3eb7dfb105965.zip opensim-SC_OLD-88d6557071f03f06c040cd4607a3eb7dfb105965.tar.gz opensim-SC_OLD-88d6557071f03f06c040cd4607a3eb7dfb105965.tar.bz2 opensim-SC_OLD-88d6557071f03f06c040cd4607a3eb7dfb105965.tar.xz |
Update svn properties, formatting cleanup.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs | 26 |
2 files changed, 14 insertions, 14 deletions
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index d9e0370..89f0e1a 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | |||
@@ -1818,7 +1818,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1818 | for (int i = 0; i < count; ++i) | 1818 | for (int i = 0; i < count; ++i) |
1819 | { | 1819 | { |
1820 | UUID uuid; | 1820 | UUID uuid; |
1821 | if(UUID.TryParse((string)respData["friendID_" + i], out uuid)) tpdAway.Add(uuid); | 1821 | if (UUID.TryParse((string)respData["friendID_" + i], out uuid)) tpdAway.Add(uuid); |
1822 | } | 1822 | } |
1823 | } | 1823 | } |
1824 | catch(Exception e) | 1824 | catch(Exception e) |
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs index e2cb2e0..605b6a2 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs | |||
@@ -161,7 +161,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
161 | // some of the friends might have teleported away. | 161 | // some of the friends might have teleported away. |
162 | // Actually, even now, between this line and the sending below, some people could TP away. So, | 162 | // Actually, even now, between this line and the sending below, some people could TP away. So, |
163 | // we'll have to lock the m_rootAgents list for the duration to prevent/delay that. | 163 | // we'll have to lock the m_rootAgents list for the duration to prevent/delay that. |
164 | lock(m_rootAgents) | 164 | lock (m_rootAgents) |
165 | { | 165 | { |
166 | List<ScenePresence> friendsHere = new List<ScenePresence>(); | 166 | List<ScenePresence> friendsHere = new List<ScenePresence>(); |
167 | try | 167 | try |
@@ -230,7 +230,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
230 | requestData.ContainsKey("friendID") && UUID.TryParse((string)requestData["friendID"], out friendID)) | 230 | requestData.ContainsKey("friendID") && UUID.TryParse((string)requestData["friendID"], out friendID)) |
231 | { | 231 | { |
232 | // try to find it and if it is there, prevent it to vanish before we sent the message | 232 | // try to find it and if it is there, prevent it to vanish before we sent the message |
233 | lock(m_rootAgents) | 233 | lock (m_rootAgents) |
234 | { | 234 | { |
235 | if (m_rootAgents.ContainsKey(agentID)) | 235 | if (m_rootAgents.ContainsKey(agentID)) |
236 | { | 236 | { |
@@ -431,7 +431,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
431 | // should receive it. If we *are* local, *we* are the destination, so we have to receive it. | 431 | // should receive it. If we *are* local, *we* are the destination, so we have to receive it. |
432 | // As grid-IMs are routed to all modules (in contrast to local IMs), we have to decide here. | 432 | // As grid-IMs are routed to all modules (in contrast to local IMs), we have to decide here. |
433 | InstantMessageReceiver recv = InstantMessageReceiver.IMModule; | 433 | InstantMessageReceiver recv = InstantMessageReceiver.IMModule; |
434 | if(GetAnyPresenceFromAgentID(toAgentID) != null) recv |= InstantMessageReceiver.FriendsModule; | 434 | if (GetAnyPresenceFromAgentID(toAgentID) != null) recv |= InstantMessageReceiver.FriendsModule; |
435 | 435 | ||
436 | // We don't really care which local scene we pipe it through. | 436 | // We don't really care which local scene we pipe it through. |
437 | m_initialScene.TriggerGridInstantMessage(msg, recv); | 437 | m_initialScene.TriggerGridInstantMessage(msg, recv); |
@@ -554,7 +554,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
554 | return; // unknown transaction | 554 | return; // unknown transaction |
555 | } | 555 | } |
556 | // else found pending friend request with that transaction => remove if done with all | 556 | // else found pending friend request with that transaction => remove if done with all |
557 | if(--m_pendingFriendRequests[transactionID].count <= 0) m_pendingFriendRequests.Remove(transactionID); | 557 | if (--m_pendingFriendRequests[transactionID].count <= 0) m_pendingFriendRequests.Remove(transactionID); |
558 | outPending(); | 558 | outPending(); |
559 | } | 559 | } |
560 | 560 | ||
@@ -604,7 +604,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
604 | // should receive it. If we *are* local, *we* are the destination, so we have to receive it. | 604 | // should receive it. If we *are* local, *we* are the destination, so we have to receive it. |
605 | // As grid-IMs are routed to all modules (in contrast to local IMs), we have to decide here. | 605 | // As grid-IMs are routed to all modules (in contrast to local IMs), we have to decide here. |
606 | InstantMessageReceiver recv = InstantMessageReceiver.IMModule; | 606 | InstantMessageReceiver recv = InstantMessageReceiver.IMModule; |
607 | if(GetAnyPresenceFromAgentID(friendID) != null) recv |= InstantMessageReceiver.FriendsModule; | 607 | if (GetAnyPresenceFromAgentID(friendID) != null) recv |= InstantMessageReceiver.FriendsModule; |
608 | 608 | ||
609 | // now we have to inform the agent about the friend. For the opposite direction, this happens in the handler | 609 | // now we have to inform the agent about the friend. For the opposite direction, this happens in the handler |
610 | // of the type 39 IM | 610 | // of the type 39 IM |
@@ -621,14 +621,14 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
621 | Transaction transaction; | 621 | Transaction transaction; |
622 | lock (m_pendingFriendRequests) | 622 | lock (m_pendingFriendRequests) |
623 | { | 623 | { |
624 | if(!m_pendingFriendRequests.TryGetValue(transactionID, out transaction)) | 624 | if (!m_pendingFriendRequests.TryGetValue(transactionID, out transaction)) |
625 | { | 625 | { |
626 | m_log.DebugFormat("[FRIEND]: Got friendship denial {0} from {1} ({2}) without matching transaction {3}", | 626 | m_log.DebugFormat("[FRIEND]: Got friendship denial {0} from {1} ({2}) without matching transaction {3}", |
627 | agentID, client.AgentId, client.Name, transactionID); | 627 | agentID, client.AgentId, client.Name, transactionID); |
628 | return; | 628 | return; |
629 | } | 629 | } |
630 | // else found pending friend request with that transaction. | 630 | // else found pending friend request with that transaction. |
631 | if(--m_pendingFriendRequests[transactionID].count <= 0) m_pendingFriendRequests.Remove(transactionID); | 631 | if (--m_pendingFriendRequests[transactionID].count <= 0) m_pendingFriendRequests.Remove(transactionID); |
632 | outPending(); | 632 | outPending(); |
633 | } | 633 | } |
634 | UUID friendID = transaction.agentID; | 634 | UUID friendID = transaction.agentID; |
@@ -661,7 +661,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
661 | // should receive it. If we *are* local, *we* are the destination, so we have to receive it. | 661 | // should receive it. If we *are* local, *we* are the destination, so we have to receive it. |
662 | // As grid-IMs are routed to all modules (in contrast to local IMs), we have to decide here. | 662 | // As grid-IMs are routed to all modules (in contrast to local IMs), we have to decide here. |
663 | InstantMessageReceiver recv = InstantMessageReceiver.IMModule; | 663 | InstantMessageReceiver recv = InstantMessageReceiver.IMModule; |
664 | if(GetAnyPresenceFromAgentID(friendID) != null) recv |= InstantMessageReceiver.FriendsModule; | 664 | if (GetAnyPresenceFromAgentID(friendID) != null) recv |= InstantMessageReceiver.FriendsModule; |
665 | 665 | ||
666 | // now we have to inform the agent about the friend. For the opposite direction, this happens in the handler | 666 | // now we have to inform the agent about the friend. For the opposite direction, this happens in the handler |
667 | // of the type 39 IM | 667 | // of the type 39 IM |
@@ -690,7 +690,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
690 | else | 690 | else |
691 | { | 691 | { |
692 | // retry 3 times, in case the agent TPed from the last known region... | 692 | // retry 3 times, in case the agent TPed from the last known region... |
693 | for(int retry = 0; retry < 3; ++retry) | 693 | for (int retry = 0; retry < 3; ++retry) |
694 | { | 694 | { |
695 | // wasn't sent, so ex-friend wasn't around on this region-server. Fetch info and try to send | 695 | // wasn't sent, so ex-friend wasn't around on this region-server. Fetch info and try to send |
696 | UserAgentData data = m_initialScene.CommsManager.UserService.GetAgentByUUID(exfriendID); | 696 | UserAgentData data = m_initialScene.CommsManager.UserService.GetAgentByUUID(exfriendID); |
@@ -859,7 +859,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
859 | List<UUID> friendIDsToLookup = new List<UUID>(friendIDsToSendTo); | 859 | List<UUID> friendIDsToLookup = new List<UUID>(friendIDsToSendTo); |
860 | foreach (UUID uuid in friendIDsToReceiveFromOffline) | 860 | foreach (UUID uuid in friendIDsToReceiveFromOffline) |
861 | { | 861 | { |
862 | if(!friendIDsToLookup.Contains(uuid)) friendIDsToLookup.Add(uuid); | 862 | if (!friendIDsToLookup.Contains(uuid)) friendIDsToLookup.Add(uuid); |
863 | } | 863 | } |
864 | 864 | ||
865 | m_log.DebugFormat("[FRIEND]: {0} to lookup, {1} to send to, {2} to receive from for agent {3}", | 865 | m_log.DebugFormat("[FRIEND]: {0} to lookup, {1} to send to, {2} to receive from for agent {3}", |
@@ -906,12 +906,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
906 | { | 906 | { |
907 | // any client is good enough, root or child... | 907 | // any client is good enough, root or child... |
908 | ScenePresence agent = GetAnyPresenceFromAgentID(uuid); | 908 | ScenePresence agent = GetAnyPresenceFromAgentID(uuid); |
909 | if(agent != null) | 909 | if (agent != null) |
910 | { | 910 | { |
911 | m_log.DebugFormat("[FRIEND]: Found local agent {0}", agent.Name); | 911 | m_log.DebugFormat("[FRIEND]: Found local agent {0}", agent.Name); |
912 | 912 | ||
913 | // friend is online and on this server... | 913 | // friend is online and on this server... |
914 | if(iAmOnline) agent.ControllingClient.SendAgentOnline(agentArr); | 914 | if (iAmOnline) agent.ControllingClient.SendAgentOnline(agentArr); |
915 | else agent.ControllingClient.SendAgentOffline(agentArr); | 915 | else agent.ControllingClient.SendAgentOffline(agentArr); |
916 | 916 | ||
917 | // done, remove it | 917 | // done, remove it |
@@ -962,7 +962,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
962 | // now we have in friendIDsToSendTo only the agents left that TPed away while we tried to contact them. | 962 | // now we have in friendIDsToSendTo only the agents left that TPed away while we tried to contact them. |
963 | // In most cases, it will be empty, and it won't loop here. But sometimes, we have to work harder and try again... | 963 | // In most cases, it will be empty, and it won't loop here. But sometimes, we have to work harder and try again... |
964 | } | 964 | } |
965 | while(++retry < 3 && friendIDsToSendTo.Count > 0); | 965 | while (++retry < 3 && friendIDsToSendTo.Count > 0); |
966 | } | 966 | } |
967 | 967 | ||
968 | private void OnEconomyDataRequest(UUID agentID) | 968 | private void OnEconomyDataRequest(UUID agentID) |