[ejabberd] ejabberd events etc

Shaun Kruger shaun.kruger at gmail.com
Sat Oct 8 22:35:16 MSD 2011

Have you looked at this?


For what you are describing I would try implementing a handler for all
of the roster_ event hooks and see which ones are being called.  I may
also add set/unset_presence_hook to that list.  Usually when I write
modules I implement hooks that I think do what I need and see what
information I receive and under what conditions I receive it.

Once you have identified which hooks you are interested in you can add
a call to os:cmd("/path/to/bash/script") to execute your script.


On Sat, Oct 8, 2011 at 12:19 PM, Stefan Bogner <sbogner at gmail.com> wrote:
> Hi,
> 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 :-)
> Thanks in advance!
> Cheers-
>  Stefan
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd

More information about the ejabberd mailing list