From 38e8853e5761d09a7e8f580dd277d9b99b834696 Mon Sep 17 00:00:00 2001 From: Homer Horwitz Date: Sat, 1 Nov 2008 22:09:48 +0000 Subject: 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. --- OpenSim/Data/SQLite/SQLiteUserData.cs | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'OpenSim/Data/SQLite/SQLiteUserData.cs') diff --git a/OpenSim/Data/SQLite/SQLiteUserData.cs b/OpenSim/Data/SQLite/SQLiteUserData.cs index 82db481..2f0863e 100644 --- a/OpenSim/Data/SQLite/SQLiteUserData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserData.cs @@ -332,8 +332,28 @@ namespace OpenSim.Data.SQLite return returnlist; } + override public Dictionary GetFriendRegionInfos (List uuids) + { + Dictionary infos = new Dictionary(); - + DataTable agents = ds.Tables["useragents"]; + foreach (UUID uuid in uuids) + { + lock (ds) + { + DataRow row = agents.Rows.Find(Util.ToRawUuidString(uuid)); + if (row == null) infos[uuid] = null; + else + { + FriendRegionInfo fri = new FriendRegionInfo(); + fri.isOnline = (bool)row["agentOnline"]; + fri.regionHandle = Convert.ToUInt64(row["currentHandle"]); + infos[uuid] = fri; + } + } + } + return infos; + } #endregion -- cgit v1.1