[ejabberd] How to use the @online@ patch

Martin Langhoff martin.langhoff at gmail.com
Wed Jan 26 17:52:56 MSK 2011


Received some private emails asking how to use the @online@ SRG.
Essentially, it's the same as the '@all@' SRG, except it removes
offline users.

What it does: it creates a dynamic SRG where members are added when
they connect. This is useful for "everyone can see everyone" smallish
jabber setups. If you have an embedded platform where you want
ejabberd to come up and auto-connect everyone-to-everyone, this works
great.

>From the web admin -- (which I don't normally use):

1. Go to http://your.host.name:5280/admin/ and login as an admin.
2. Click on "Virtual Hosts", then your hostname, then "Shared Roster
Groups". Type "Online" and click Add New.
3. Click on "Online" and enter "Online" for Name, "@online@" for
Members, and "Online" for Displayed Groups. Click Submit.
It should be working now!
4. In your jabber client, disconnect and reconnect the
"jtest at your.host.name" account to activate seeing the shared roster
group. Note that you will only see it in your buddy list when other
users connect - an empty group is not shown.

>From ejabberdctl, create an Online group with '@online@' as members,
this triggers a special codepath. It's easy to script it, see:

http://dev.laptop.org/git/users/martin/moodle.git/tree/auth/olpcxs/auth.php?h=mdl19-xs06&id=d0d20b7cd4ab49e50fdfcb2b6257b25a16d862b2#n456

http://dev.laptop.org/git/users/martin/moodle.git/tree/lib/ejabberdctl.php?h=d0d20b7cd4ab49e50fdfcb2b6257b25a16d862b2

cheers,


m
-- 
 martin.langhoff at gmail.com
 martin at laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff


More information about the ejabberd mailing list