Skip to content


Subversion checkout URL

You can clone with
Download ZIP
An ejabberd module that will turn events into HTTP requests
Erlang Shell
Branch: master



This code has not been touched in 3 years. I no longer use ejabberd, or erlang. Please do not use this project in production.


mod_eventful is an ejabberd module that listens for certain events, and sends the details of these via HTTP to another service. This allows internal events inside ejabberd to trigger actions on external services. There is also support for basic access authentication on the HTTP requests to help provide a simple layer of security for the actions on your external service.

Events supported

  • set_presence_hook: Triggered whenever a client changes their presence.
  • unset_presence_hook: Triggered whenever a client goes offline.
  • online_hook: Triggered when a client comes online, and there are no other clients online with the same bare jid.
  • offline_hook: Triggered when a client goes offline, and there are no other clients online with the same bare jid.
  • message_hook: Triggered whenever a user sends a message, either in a MUC or normally.


  • ejabberd 2.1.x


Make sure that ejabberd is already installed. The build script assumes it lives at /usr/lib/ejabberd

$ git clone git://
$ cd mod_eventful
$ ./
$ sudo cp ebin/*.beam /usr/lib/ejabberd/ebin

Update the configuration in /etc/ejabberd/ejabberd.cfg and restart ejabberd

Example Configuration

%%%   =======

  {mod_eventful, [
      {url, [
        {online_hook, "http://localhost/users/online"},
        {offline_hook, "http://localhost/users/offline"},
        {unset_presence_hook, undefined},
        {set_presence_hook, undefined},
        {message_hook, "http://localhost/messages"}
      {user,     "HTTP BASIC USERNAME"},
      {password, "HTTP BASIC PASSWORD"}]},
Something went wrong with that request. Please try again.