In the in game chat, when lots of people are watching I think this feature (some parts of it) seems to already be implemented for sorting users.
There’s two options for sorting, one is sort users alphabetically and the other is to sort users by ranking/rating.
Would it be possible to reuse some of that code and add a field for online/offline sorting?
(One similarity I suppose this has with the groups, is that the status of users is changing regularly, that is, which users are present in chat changes, similar to the way online status of players in a group would change.)
I guess people have already mentioned that friends lists have a toggle to show only online or online +offline friends too.
I just (tried to) cut out the names, so it doesn’t look like I’m singling out users in particular.