[ejabberd] Getting the status of connected users

Alexey Shchepin alexey at sevcom.net
Thu Feb 12 00:48:11 MSK 2004


Hello, Mickael!

On Mon, 9 Feb 2004 22:51:48 +0000, you said:

 MR> Hello, I am trying to programmatically get the list and status of all
 MR> connected users.  It is easy to get the list of connected users (by
 MR> looking at the presence table). However, I did not find an handy way to
 MR> get the status (Available, free for chat, ...) of those users.

 MR> Any idea ?

This status is stored only inside state of ejabberd_c2s FSMs
(#state.pres_last), and it seems the simplest way is to add processing of
e.g. handle_sync_event(get_presence, ...) to ejabberd_c2s, and then send such
requests to all c2s processes.



More information about the ejabberd mailing list