From 5f15ee95dc140ba775c4db801a72f6623e408b0f Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 3 Sep 2013 00:16:43 +0100 Subject: [PATCH] Fix logic errors in "show grid users online" console command which didn't actually filter out users shown continuously online for more than 5 days Remove confusion in command output. --- OpenSim/Services/UserAccountService/GridUserService.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/OpenSim/Services/UserAccountService/GridUserService.cs b/OpenSim/Services/UserAccountService/GridUserService.cs index f9cfa12633..944411f2c8 100644 --- a/OpenSim/Services/UserAccountService/GridUserService.cs +++ b/OpenSim/Services/UserAccountService/GridUserService.cs @@ -78,14 +78,13 @@ namespace OpenSim.Services.UserAccountService // onlineCount++; int unixLoginTime = int.Parse(gu.Data["Login"]); - DateTime loginDateTime = Util.UnixEpoch.AddSeconds(unixLoginTime); - if ((loginDateTime - now).Days < 5) + if ((now - Util.ToDateTime(unixLoginTime)).Days < 5) onlineRecentlyCount++; } } - MainConsole.Instance.OutputFormat("Users online within last 5 days: {0}", onlineRecentlyCount); + MainConsole.Instance.OutputFormat("Users online: {0}", onlineRecentlyCount); } public virtual GridUserInfo GetGridUserInfo(string userID)