mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
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.
This commit is contained in:
@@ -332,8 +332,28 @@ namespace OpenSim.Data.SQLite
|
||||
return returnlist;
|
||||
}
|
||||
|
||||
override public Dictionary<UUID, FriendRegionInfo> GetFriendRegionInfos (List<UUID> uuids)
|
||||
{
|
||||
Dictionary<UUID, FriendRegionInfo> infos = new Dictionary<UUID,FriendRegionInfo>();
|
||||
|
||||
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user