Aha, OK, don't know about it, but if Google invented it, it would be a good idea, he?
OK, serious again
Did Google's IM still work with other mail programs? I hardly believe. I guess, this is a have-only feature for Google Mail users, right? Then, the technique is pretty simple. Google has its mail servers and know all there logged in users and can mark someone as online. But Round Cube is a web based frontend in a multi environmental email system and I have no idea how my mail server, presenting me my mails in RC, and e.g. a gmail or web mail (freemail) system will communicate to let each other know, that a user just signed in.
To realise this, every server has to communicate with all the other mail servers and tell them a login and a logout. Guess, this is far upon Roundcubes' possibilities, isn't it?
BTW:
http://www.icq.com/download/icq2go/ no need to install it... only... your history isn't that nice like on a installed version. ICQ2003b fan
Compromise: Creating a special folder for an IM dialog between two persons. The emails are shown like an ICQ dialog and every new message is with the power of ajax added to the 'history'. Just an idea... but wouldn't this like emailing?