diff options
author | Cinder | 2015-07-30 08:50:07 -0600 |
---|---|---|
committer | Oren Hurvitz | 2015-07-31 17:19:13 +0100 |
commit | 368ea78d14ac301eda2920d82b7bc81ca848817e (patch) | |
tree | 1aa7e3a403a84637460b07d682984ac6b4aa1db8 /OpenSim/Addons/Groups/Service/GroupsService.cs | |
parent | Eliminated several warnings (diff) | |
download | opensim-SC-368ea78d14ac301eda2920d82b7bc81ca848817e.zip opensim-SC-368ea78d14ac301eda2920d82b7bc81ca848817e.tar.gz opensim-SC-368ea78d14ac301eda2920d82b7bc81ca848817e.tar.bz2 opensim-SC-368ea78d14ac301eda2920d82b7bc81ca848817e.tar.xz |
Show last online status of group members from the PresenceService in group profiles
Signed-off-by: Oren Hurvitz <orenh@kitely.com>
Diffstat (limited to 'OpenSim/Addons/Groups/Service/GroupsService.cs')
-rw-r--r-- | OpenSim/Addons/Groups/Service/GroupsService.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/OpenSim/Addons/Groups/Service/GroupsService.cs b/OpenSim/Addons/Groups/Service/GroupsService.cs index 4da7233..07641ef 100644 --- a/OpenSim/Addons/Groups/Service/GroupsService.cs +++ b/OpenSim/Addons/Groups/Service/GroupsService.cs | |||
@@ -307,6 +307,21 @@ namespace OpenSim.Groups | |||
307 | m.Contribution = Int32.Parse(d.Data["Contribution"]); | 307 | m.Contribution = Int32.Parse(d.Data["Contribution"]); |
308 | m.ListInProfile = d.Data["ListInProfile"] == "1" ? true : false; | 308 | m.ListInProfile = d.Data["ListInProfile"] == "1" ? true : false; |
309 | 309 | ||
310 | GridUserData gud = m_GridUserService.Get(d.PrincipalID); | ||
311 | if (gud != null) | ||
312 | { | ||
313 | if (bool.Parse(gud.Data["Online"])) | ||
314 | { | ||
315 | m.OnlineStatus = @"Online"; | ||
316 | } | ||
317 | else | ||
318 | { | ||
319 | int unixtime = int.Parse(gud.Data["Login"]); | ||
320 | // The viewer is very picky about how these strings are formed. Eg. it will crash on malformed dates! | ||
321 | m.OnlineStatus = (unixtime == 0) ? @"unknown" : Util.ToDateTime(unixtime).ToString("MM/dd/yyyy"); | ||
322 | } | ||
323 | } | ||
324 | |||
310 | // Is this person an owner of the group? | 325 | // Is this person an owner of the group? |
311 | m.IsOwner = (rolemembershipsList.Find(r => r.RoleID == ownerRoleID) != null) ? true : false; | 326 | m.IsOwner = (rolemembershipsList.Find(r => r.RoleID == ownerRoleID) != null) ? true : false; |
312 | 327 | ||