I could see that there is a property name pyAvailabilityIcon in the Data-Admin-Operator-ID. If you set this property when user logs in and log out when user logs out, you could achive your requirement.
But to implemet this, you need to have your own custom authentication activity.
Once this is set, you could check the properyt and display user availability just like Lync
I have one idea, just give a try. Create one date time property (like logoffdatetime) in Data-Admin-Operator-ID class. Whenever user logoff from the portal, run an activity to save the logoff date time in operator record.
Lots of work has been done in this regards in current Pega release and the entire Operator presense framework in implemented.
However for previous releases, you can read the existing sessions and see who all are online. You can start by looking at the activities invovled when we click remote tracer to see all the active operators and sessions.