From cbd02218704287640ba5c7b564440a6590e038cf Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 23 Nov 2008 05:16:07 +0000 Subject: Plumb in the presence notifications and region shutdown/restart messages from the presence module to the message server, through the user server and on into the database. This should fix the "Already logged in" issue that grids see after a sim crashes, or a user crashes out of a sim. Not yet a 100% solution for friends, but getting there. --- OpenSim/Data/MySQL/MySQLUserData.cs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'OpenSim/Data/MySQL/MySQLUserData.cs') diff --git a/OpenSim/Data/MySQL/MySQLUserData.cs b/OpenSim/Data/MySQL/MySQLUserData.cs index 288ca86..f203a66 100644 --- a/OpenSim/Data/MySQL/MySQLUserData.cs +++ b/OpenSim/Data/MySQL/MySQLUserData.cs @@ -891,5 +891,31 @@ namespace OpenSim.Data.MySQL dbm.Release(); } } + + public override void LogoutUsers(UUID regionID) + { + Dictionary param = new Dictionary(); + param["?regionID"] = regionID.ToString(); + + MySQLSuperManager dbm = GetLockedConnection("LogoutUsers"); + + try + { + dbm.Manager.ExecuteParameterizedSql( + "update " + m_agentsTableName + " SET agentOnline = 0 " + + "where currentRegion = ?regionID", + param); + } + catch (Exception e) + { + dbm.Manager.Reconnect(); + m_log.Error(e.ToString()); + return; + } + finally + { + dbm.Release(); + } + } } } -- cgit v1.1