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.
0.7.6-extended
Justin Clark-Casey (justincc) 2013-09-03 00:16:43 +01:00
parent 49228f9855
commit dbbc260d1a
1 changed files with 2 additions and 3 deletions

View File

@ -78,14 +78,13 @@ namespace OpenSim.Services.UserAccountService
// onlineCount++; // onlineCount++;
int unixLoginTime = int.Parse(gu.Data["Login"]); 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++; 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) public virtual GridUserInfo GetGridUserInfo(string userID)