[ejabberd] another mod_service_log question
badlop at gmail.com
Wed Mar 23 02:40:12 MSK 2011
2011/3/22 Daniel Dormont <dan at greywallsoftware.com>:
> But the very first packet
> in my snippet above - the one *from* the user *to* the room - shouldn't that
> be logged?
Looking at mod_service_log source code, it adds hooks to the events
user_send_packet and user_receive_packet.
I imagine that your case is: ejabberd closes a client connection and
later kicks that room occupant out of the room without other
occupants. In that case no packet is sent or received by any user, and
consequently the mentioned events aren't run.
1. Add some INFO_MSG lines to ejabberd_hooks.erl, then provoke your
case and see in the logs what events are really ran by ejabberd in
that specific case.
2. If no useful event is run, you'll have to customize also
mod_muc_room in order to run an event as you desire.
3. Once you know which event is run in your case, customize
mod_service_log to add a hook for that event.
More information about the ejabberd