mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
Add last_seen field to regions table
This commit is contained in:
5
OpenSim/Data/MySQL/Resources/006_GridStore.sql
Normal file
5
OpenSim/Data/MySQL/Resources/006_GridStore.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE `regions` ADD COLUMN `last_seen` integer NOT NULL DEFAULT 0;
|
||||
|
||||
COMMIT;
|
||||
@@ -139,6 +139,7 @@ namespace OpenSim.Services.GridService
|
||||
|
||||
try
|
||||
{
|
||||
rdata.Data["last_seen"] = Util.UnixTimeSinceEpoch();
|
||||
m_Database.Store(rdata);
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -164,6 +165,7 @@ namespace OpenSim.Services.GridService
|
||||
int flags = Convert.ToInt32(region.Data["flags"]);
|
||||
flags &= ~(int)OpenSim.Data.RegionFlags.RegionOnline;
|
||||
region.Data["flags"] = flags.ToString();
|
||||
region.Data["last_seen"] = Util.UnixTimeSinceEpoch();
|
||||
try
|
||||
{
|
||||
m_Database.Store(region);
|
||||
|
||||
Reference in New Issue
Block a user