aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/Avatar/Friends
diff options
context:
space:
mode:
authorAdam Frisby2008-05-01 18:04:42 +0000
committerAdam Frisby2008-05-01 18:04:42 +0000
commit20a9bf08f51351e1e0a9de94f184ff56cd572665 (patch)
tree52da64dab26353b903c8e4befed0178fa72a188b /OpenSim/Region/Environment/Modules/Avatar/Friends
parentMore config cleanup in LaunchSLClient. (diff)
downloadopensim-SC_OLD-20a9bf08f51351e1e0a9de94f184ff56cd572665.zip
opensim-SC_OLD-20a9bf08f51351e1e0a9de94f184ff56cd572665.tar.gz
opensim-SC_OLD-20a9bf08f51351e1e0a9de94f184ff56cd572665.tar.bz2
opensim-SC_OLD-20a9bf08f51351e1e0a9de94f184ff56cd572665.tar.xz
* Rolled back a few changes.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Avatar/Friends')
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs34
1 files changed, 17 insertions, 17 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs
index 1dffc62..dd6a92e 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs
@@ -42,10 +42,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
42 { 42 {
43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
44 44
45 private readonly Dictionary<LLUUID, List<FriendListItem>> FriendLists = new Dictionary<LLUUID, List<FriendListItem>>(); 45 private Dictionary<LLUUID, List<FriendListItem>> FriendLists = new Dictionary<LLUUID, List<FriendListItem>>();
46 private readonly Dictionary<LLUUID, LLUUID> m_pendingFriendRequests = new Dictionary<LLUUID, LLUUID>(); 46 private Dictionary<LLUUID, LLUUID> m_pendingFriendRequests = new Dictionary<LLUUID, LLUUID>();
47 private readonly Dictionary<LLUUID, ulong> m_rootAgents = new Dictionary<LLUUID, ulong>(); 47 private Dictionary<LLUUID, ulong> m_rootAgents = new Dictionary<LLUUID, ulong>();
48 private readonly List<Scene> m_scene = new List<Scene>(); 48 private List<Scene> m_scene = new List<Scene>();
49 49
50 #region IRegionModule Members 50 #region IRegionModule Members
51 51
@@ -213,7 +213,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
213 List<LLUUID> updateUsers = new List<LLUUID>(); 213 List<LLUUID> updateUsers = new List<LLUUID>();
214 foreach (FriendListItem fli in lfli) 214 foreach (FriendListItem fli in lfli)
215 { 215 {
216 if (fli.onlinestatus) 216 if (fli.onlinestatus == true)
217 { 217 {
218 updateUsers.Add(fli.Friend); 218 updateUsers.Add(fli.Friend);
219 } 219 }
@@ -357,20 +357,20 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
357 // https://wiki.secondlife.com/wiki/ImprovedInstantMessage 357 // https://wiki.secondlife.com/wiki/ImprovedInstantMessage
358 358
359 // 38 == Offer friendship 359 // 38 == Offer friendship
360 if (dialog == 38) 360 if (dialog == (byte) 38)
361 { 361 {
362 LLUUID friendTransactionID = LLUUID.Random(); 362 LLUUID friendTransactionID = LLUUID.Random();
363 363
364 m_pendingFriendRequests.Add(friendTransactionID, fromAgentID); 364 m_pendingFriendRequests.Add(friendTransactionID, fromAgentID);
365 365
366 m_log.Info("[FRIEND]: 38 - From:" + fromAgentID + " To: " + toAgentID + " Session:" + imSessionID + " Message:" + 366 m_log.Info("[FRIEND]: 38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" +
367 message); 367 message);
368 GridInstantMessage msg = new GridInstantMessage(); 368 GridInstantMessage msg = new GridInstantMessage();
369 msg.fromAgentID = fromAgentID.UUID; 369 msg.fromAgentID = fromAgentID.UUID;
370 msg.fromAgentSession = fromAgentSession.UUID; 370 msg.fromAgentSession = fromAgentSession.UUID;
371 msg.toAgentID = toAgentID.UUID; 371 msg.toAgentID = toAgentID.UUID;
372 msg.imSessionID = friendTransactionID.UUID; // This is the item we're mucking with here 372 msg.imSessionID = friendTransactionID.UUID; // This is the item we're mucking with here
373 m_log.Info("[FRIEND]: Filling Session: " + msg.imSessionID); 373 m_log.Info("[FRIEND]: Filling Session: " + msg.imSessionID.ToString());
374 msg.timestamp = timestamp; 374 msg.timestamp = timestamp;
375 if (client != null) 375 if (client != null)
376 { 376 {
@@ -393,16 +393,16 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
393 } 393 }
394 394
395 // 39 == Accept Friendship 395 // 39 == Accept Friendship
396 if (dialog == 39) 396 if (dialog == (byte) 39)
397 { 397 {
398 m_log.Info("[FRIEND]: 39 - From:" + fromAgentID + " To: " + toAgentID + " Session:" + imSessionID + " Message:" + 398 m_log.Info("[FRIEND]: 39 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" +
399 message); 399 message);
400 } 400 }
401 401
402 // 40 == Decline Friendship 402 // 40 == Decline Friendship
403 if (dialog == 40) 403 if (dialog == (byte) 40)
404 { 404 {
405 m_log.Info("[FRIEND]: 40 - From:" + fromAgentID + " To: " + toAgentID + " Session:" + imSessionID + " Message:" + 405 m_log.Info("[FRIEND]: 40 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" +
406 message); 406 message);
407 } 407 }
408 } 408 }
@@ -433,14 +433,14 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
433 msg.ParentEstateID = 0; 433 msg.ParentEstateID = 0;
434 msg.timestamp = (uint) Util.UnixTimeSinceEpoch(); 434 msg.timestamp = (uint) Util.UnixTimeSinceEpoch();
435 msg.RegionID = SceneAgentIn.RegionInfo.RegionID.UUID; 435 msg.RegionID = SceneAgentIn.RegionInfo.RegionID.UUID;
436 msg.dialog = 39; // Approved friend request 436 msg.dialog = (byte) 39; // Approved friend request
437 msg.Position = new sLLVector3(); 437 msg.Position = new sLLVector3();
438 msg.offline = 0; 438 msg.offline = (byte) 0;
439 msg.binaryBucket = new byte[0]; 439 msg.binaryBucket = new byte[0];
440 // We don't really care which scene we pipe it through, it goes to the shared IM Module and/or the database 440 // We don't really care which scene we pipe it through, it goes to the shared IM Module and/or the database
441 441
442 SceneAgentIn.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); 442 SceneAgentIn.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule);
443 SceneAgentIn.StoreAddFriendship(m_pendingFriendRequests[transactionID], agentID, 1); 443 SceneAgentIn.StoreAddFriendship(m_pendingFriendRequests[transactionID], agentID, (uint) 1);
444 m_pendingFriendRequests.Remove(transactionID); 444 m_pendingFriendRequests.Remove(transactionID);
445 445
446 // TODO: Inform agent that the friend is online 446 // TODO: Inform agent that the friend is online
@@ -471,9 +471,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
471 msg.ParentEstateID = 0; 471 msg.ParentEstateID = 0;
472 msg.timestamp = (uint) Util.UnixTimeSinceEpoch(); 472 msg.timestamp = (uint) Util.UnixTimeSinceEpoch();
473 msg.RegionID = SceneAgentIn.RegionInfo.RegionID.UUID; 473 msg.RegionID = SceneAgentIn.RegionInfo.RegionID.UUID;
474 msg.dialog = 40; // Deny friend request 474 msg.dialog = (byte) 40; // Deny friend request
475 msg.Position = new sLLVector3(); 475 msg.Position = new sLLVector3();
476 msg.offline = 0; 476 msg.offline = (byte) 0;
477 msg.binaryBucket = new byte[0]; 477 msg.binaryBucket = new byte[0];
478 SceneAgentIn.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); 478 SceneAgentIn.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule);
479 m_pendingFriendRequests.Remove(transactionID); 479 m_pendingFriendRequests.Remove(transactionID);