mirror of
https://github.com/opensim/opensim.git
synced 2026-08-02 06:44:15 +08:00
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.
This commit is contained in:
@@ -891,5 +891,31 @@ namespace OpenSim.Data.MySQL
|
||||
dbm.Release();
|
||||
}
|
||||
}
|
||||
|
||||
public override void LogoutUsers(UUID regionID)
|
||||
{
|
||||
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user