aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLUserData.cs
diff options
context:
space:
mode:
authorMelanie Thielker2008-11-23 05:16:07 +0000
committerMelanie Thielker2008-11-23 05:16:07 +0000
commitcbd02218704287640ba5c7b564440a6590e038cf (patch)
treee600fd4868bce3e3d007d6d1894dd814d948692a /OpenSim/Data/MySQL/MySQLUserData.cs
parentMantis#2660. Thank you kindly, Ruud Lathrop for a patch that: (diff)
downloadopensim-SC_OLD-cbd02218704287640ba5c7b564440a6590e038cf.zip
opensim-SC_OLD-cbd02218704287640ba5c7b564440a6590e038cf.tar.gz
opensim-SC_OLD-cbd02218704287640ba5c7b564440a6590e038cf.tar.bz2
opensim-SC_OLD-cbd02218704287640ba5c7b564440a6590e038cf.tar.xz
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.
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLUserData.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLUserData.cs26
1 files changed, 26 insertions, 0 deletions
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
891 dbm.Release(); 891 dbm.Release();
892 } 892 }
893 } 893 }
894
895 public override void LogoutUsers(UUID regionID)
896 {
897 Dictionary<string, string> param = new Dictionary<string, string>();
898 param["?regionID"] = regionID.ToString();
899
900 MySQLSuperManager dbm = GetLockedConnection("LogoutUsers");
901
902 try
903 {
904 dbm.Manager.ExecuteParameterizedSql(
905 "update " + m_agentsTableName + " SET agentOnline = 0 " +
906 "where currentRegion = ?regionID",
907 param);
908 }
909 catch (Exception e)
910 {
911 dbm.Manager.Reconnect();
912 m_log.Error(e.ToString());
913 return;
914 }
915 finally
916 {
917 dbm.Release();
918 }
919 }
894 } 920 }
895} 921}