diff options
author | Justin Clark-Casey (justincc) | 2013-09-03 00:16:43 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-09-04 00:47:22 +0100 |
commit | dbbc260d1a72abfdec9767a22da2890a20046345 (patch) | |
tree | 7d9dec3053df1fa4c31d1bbcb52c54b88c1fdded /OpenSim | |
parent | Add experimental "show grid users online" console command to show grid users ... (diff) | |
download | opensim-SC_OLD-dbbc260d1a72abfdec9767a22da2890a20046345.zip opensim-SC_OLD-dbbc260d1a72abfdec9767a22da2890a20046345.tar.gz opensim-SC_OLD-dbbc260d1a72abfdec9767a22da2890a20046345.tar.bz2 opensim-SC_OLD-dbbc260d1a72abfdec9767a22da2890a20046345.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')
-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) |