[ejabberd] [PATCH] mod_shared_roster: Teach remove_user_from_group() and add_user_to_group() about special users

Badlop badlop at gmail.com
Tue Apr 21 17:22:05 MSD 2009

2009/4/17  <martin.langhoff at gmail.com>:
> With this patch, if the 'User' parameter is @all@, @online, @recent@ or
> @nearby@, the add/removes change the group options to set/unset the
> related modes.
> This allows mod_ctlextra and other modules that tap call into these
> functions to manipulate the mode of the SRG without explicit extensions.

I've submitted a bug report:

Your path looks almost good. For ejabberd svn, I just removed those
groups that are not implemented in ejabberd. For OLPC you will still
need to apply a patch, but it will be smaller :)

For your reference, I attach a diff between your original patch and my
patch in 916.

BTW, when reporting a bug/misfeature, it helps to provide an example
usage, or the steps to reproduce the problem (if possible). See my
report for an example.

> This is coded and tested on top of 2.0.3, and applies cleanly to the tip
> of 2.0.x .
> This makes mod_ctrlextra able to control SRGs fully (sometihng I need for
> the OLPC XS), and I suspect other modules (xmlrpc?) can take advantage of
> this.

If you are curious: I tested this patch using mod_admin_extra and worked

$ ejabberdctl srg_user_add @all@ localhost group1 localhost
$ ejabberdctl srg_user_del @all@ localhost group1 localhost

-------------- next part --------------
A non-text attachment was scrubbed...
Name: martin-vs-916.diff
Type: text/x-patch
Size: 2518 bytes
Desc: not available
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20090421/d1dfbf42/attachment.bin>

More information about the ejabberd mailing list