diff options
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLUserData.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLUserData.cs | 26 |
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 | } |