setting up events and hooks

Hello,

I have installed the ejabberd server and I have requirement that it requires to configure the hooks and events based on customer request.

So how I can add hooks to the ejabberd? Do I need to add it in the configuration or any other file. I am newbie to ejabberd and I would request if anyone have documentation setting up hooks then it will be really helpful for me.

I want to create a new event which will notify when connection is established with the client.
I am looking forward to it.

Syndicate content