aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL/MSSQLUserData.cs
diff options
context:
space:
mode:
authorHomer Horwitz2008-11-01 22:09:48 +0000
committerHomer Horwitz2008-11-01 22:09:48 +0000
commit38e8853e5761d09a7e8f580dd277d9b99b834696 (patch)
tree653fe4c9075a03c05a4b5782f7309afa83062e5c /OpenSim/Data/MSSQL/MSSQLUserData.cs
parent* minor: Remove mono compiler warning (diff)
downloadopensim-SC_OLD-38e8853e5761d09a7e8f580dd277d9b99b834696.zip
opensim-SC_OLD-38e8853e5761d09a7e8f580dd277d9b99b834696.tar.gz
opensim-SC_OLD-38e8853e5761d09a7e8f580dd277d9b99b834696.tar.bz2
opensim-SC_OLD-38e8853e5761d09a7e8f580dd277d9b99b834696.tar.xz
Megapatch that fixes/adds: friend offer/deny/accept, friendship termination,
on-/offline updates, calling cards for friends. This adds methods in the DB layer and changes the MessagingServer, so a full update (incl. UGAIM) is necessary to get it working. Older regions shouldn't break, nor should older UGAIM break newer regions, but friends/presence will only work with all concerned parts (UGAIM, source region and destination region) at this revision (or later). I added the DB code for MSSQL, too, but couldn't test that. BEWARE: May contain bugs.
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLUserData.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLUserData.cs b/OpenSim/Data/MSSQL/MSSQLUserData.cs
index ee7765f..4d4b3bc 100644
--- a/OpenSim/Data/MSSQL/MSSQLUserData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLUserData.cs
@@ -570,6 +570,39 @@ namespace OpenSim.Data.MSSQL
570 return friendList; 570 return friendList;
571 } 571 }
572 572
573 override public Dictionary<UUID, FriendRegionInfo> GetFriendRegionInfos (List<UUID> uuids)
574 {
575 Dictionary<UUID, FriendRegionInfo> infos = new Dictionary<UUID,FriendRegionInfo>();
576 try
577 {
578 foreach (UUID uuid in uuids)
579 {
580 using (AutoClosingSqlCommand command = database.Query(
581 "select agentOnline,currentHandle from " + m_agentsTableName + " where UUID = @uuid"))
582 {
583 command.Parameters.Add(database.CreateParameter("@uuid", uuid));
584
585 using (IDataReader reader = command.ExecuteReader())
586 {
587 while (reader.Read())
588 {
589 FriendRegionInfo fri = new FriendRegionInfo();
590 fri.isOnline = (sbyte)reader["agentOnline"] != 0;
591 fri.regionHandle = (ulong)reader["currentHandle"];
592
593 infos[uuid] = fri;
594 }
595 }
596 }
597 }
598 }
599 catch (Exception e)
600 {
601 m_log.Warn("[MSSQL]: Got exception on trying to find friends regions:", e);
602 }
603
604 return infos;
605 }
573 #endregion 606 #endregion
574 607
575 #region Money functions (not used) 608 #region Money functions (not used)