[ejabberd] Communicate with other code from hooks

Alexander Kuleshov kuleshovmail at gmail.com
Mon Aug 1 10:40:05 MSD 2011


Hello,

I have hook handler in my code:

    ejabberd_hooks:add(sm_register_connection_hook,
BotState#state.host, ?MODULE, on_register, 80),

on_register(SID, JID, INFO) ->
    {_, _, _, _, Name, _, _} = JID,
    ok.

How can i send message to gen_server for example from this hook with Name?

How can i make know gen_server pid to hook?

Thank you.


More information about the ejabberd mailing list