diff options
author | Justin Clark-Casey (justincc) | 2013-09-03 00:16:43 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-09-03 00:16:43 +0100 |
commit | 5f15ee95dc140ba775c4db801a72f6623e408b0f (patch) | |
tree | 1174945d81d30143d45c48413a2a7025d3b85c6e /OpenSim/Services/UserAccountService/GridUserService.cs | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-5f15ee95dc140ba775c4db801a72f6623e408b0f.zip opensim-SC-5f15ee95dc140ba775c4db801a72f6623e408b0f.tar.gz opensim-SC-5f15ee95dc140ba775c4db801a72f6623e408b0f.tar.bz2 opensim-SC-5f15ee95dc140ba775c4db801a72f6623e408b0f.tar.xz |
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.
Diffstat (limited to 'OpenSim/Services/UserAccountService/GridUserService.cs')
-rw-r--r-- | OpenSim/Services/UserAccountService/GridUserService.cs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/OpenSim/Services/UserAccountService/GridUserService.cs b/OpenSim/Services/UserAccountService/GridUserService.cs index f9cfa12..944411f 100644 --- a/OpenSim/Services/UserAccountService/GridUserService.cs +++ b/OpenSim/Services/UserAccountService/GridUserService.cs | |||
@@ -78,14 +78,13 @@ namespace OpenSim.Services.UserAccountService | |||
78 | // onlineCount++; | 78 | // onlineCount++; |
79 | 79 | ||
80 | int unixLoginTime = int.Parse(gu.Data["Login"]); | 80 | int unixLoginTime = int.Parse(gu.Data["Login"]); |
81 | DateTime loginDateTime = Util.UnixEpoch.AddSeconds(unixLoginTime); | ||
82 | 81 | ||
83 | if ((loginDateTime - now).Days < 5) | 82 | if ((now - Util.ToDateTime(unixLoginTime)).Days < 5) |
84 | onlineRecentlyCount++; | 83 | onlineRecentlyCount++; |
85 | } | 84 | } |
86 | } | 85 | } |
87 | 86 | ||
88 | MainConsole.Instance.OutputFormat("Users online within last 5 days: {0}", onlineRecentlyCount); | 87 | MainConsole.Instance.OutputFormat("Users online: {0}", onlineRecentlyCount); |
89 | } | 88 | } |
90 | 89 | ||
91 | public virtual GridUserInfo GetGridUserInfo(string userID) | 90 | public virtual GridUserInfo GetGridUserInfo(string userID) |