[ejabberd] ejabberd events etc

Konstantin Khomoutov flatworm at users.sourceforge.net
Sat Oct 8 22:34:31 MSD 2011

On Sat, Oct 08, 2011 at 08:19:39PM +0200, Stefan Bogner wrote:

> please forgive me if this is a dumb question, but erlang drives me nuts and I 
> currently don't really have the time to dive into another programming 
> language...
> So I understand ejabberd has events which can be hooked into using erlang 
> scripts/modules. What I am trying to achieve is simply run a shell (bash) 
> command for the following events: 
>   - User in roster goes online
>   - User in roster goes offline
>   - User in roster changes status (ie Online to Busy)
>   - New message for account xyz
> My hope is that there is an existing ejabberd module that I can use for that, 
> yet I was unable to find one :-( 
> Any hints would be appreciated. If there's no such thing I'd also appreciate 
> hints/pointers to ejabberd modules that might achieve this with just a few 
> changes to the code (I guess I might be able to do that using c'n'p without 
> really having to learn erlang :-) 
If you can't grok Erlang and have no time to do that properly why not
then just take a bot written in your preferred programming language and
modify it instead?  If you need to watch all your users you could
achieve this using the @all@ shared roster group which should be added
to the list of SRGs the bot's account "sees".

More information about the ejabberd mailing list