aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MSSQL')
-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)