aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MySQL')
-rw-r--r--OpenSim/Data/MySQL/MySQLUserData.cs43
1 files changed, 43 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/MySQLUserData.cs b/OpenSim/Data/MySQL/MySQLUserData.cs
index e671989..c3aade0 100644
--- a/OpenSim/Data/MySQL/MySQLUserData.cs
+++ b/OpenSim/Data/MySQL/MySQLUserData.cs
@@ -365,6 +365,49 @@ namespace OpenSim.Data.MySQL
365 return Lfli; 365 return Lfli;
366 } 366 }
367 367
368 override public Dictionary<UUID, FriendRegionInfo> GetFriendRegionInfos (List<UUID> uuids)
369 {
370 MySQLSuperManager dbm = GetLockedConnection("GetFriendRegionInfos");
371 Dictionary<UUID, FriendRegionInfo> infos = new Dictionary<UUID,FriendRegionInfo>();
372
373 try
374 {
375 foreach (UUID uuid in uuids)
376 {
377 Dictionary<string, string> param = new Dictionary<string, string>();
378 param["?uuid"] = uuid.ToString();
379 IDbCommand result =
380 dbm.Manager.Query("select agentOnline,currentHandle from " + m_agentsTableName +
381 " where UUID = ?uuid", param);
382
383 IDataReader reader = result.ExecuteReader();
384 while (reader.Read())
385 {
386 FriendRegionInfo fri = new FriendRegionInfo();
387 fri.isOnline = (sbyte)reader["agentOnline"] != 0;
388 fri.regionHandle = (ulong)reader["currentHandle"];
389
390 infos[uuid] = fri;
391 }
392
393 reader.Dispose();
394 result.Dispose();
395 }
396 }
397 catch (Exception e)
398 {
399 m_log.Warn("[MYSQL]: Got exception on trying to find friends regions:", e);
400 dbm.Manager.Reconnect();
401 m_log.Error(e.ToString());
402 }
403 finally
404 {
405 dbm.Release();
406 }
407
408 return infos;
409 }
410
368 #endregion 411 #endregion
369 412
370 public override void UpdateUserCurrentRegion(UUID avatarid, UUID regionuuid, ulong regionhandle) 413 public override void UpdateUserCurrentRegion(UUID avatarid, UUID regionuuid, ulong regionhandle)