[ejabberd] Any complete docs about ejabberd module development?
badlop at gmail.com
Mon Jan 11 22:56:22 MSK 2010
2010/1/11 Liu Xi <jason.liuxi at gmail.com>:
> Dear all,
> I got a task on extending a ejabberd server to fit out specific needs.
> Here is the situation, imaging a chatroom based on ejabberd, is it possible
> for developing a module to perform the action like this: people "A" speaks
> in the chatroom, in the usual way, that is supposed to send to all the other
> fellows in the same chatroom via the server. But I want the server to send
> only to some specific clients, that is to say: is it possible for developing
> a module to modify the original chatroom receivers list?
> 2.Is it possible to implement the functionality I described above just
> devloping modules? I mean compared to modifying the source code.
There isn't any hook currently for what you want.
You need to modify mod_muc_room.erl to run a new hook allowing to
modify the receiver list.
With some luck that could be 4 or 5 lines of code.
And then write your module that registers to the hook, modifies the
receiver list and returns it back to mod_muc_room. That can be as many
lines and as complex as you want :)
> I checked the module development guide on the process-one site
> but lots of API are not complete, for example, in the page of events and
> hooks, only the event names are listed, nothing about when the events will
> happen and what the event exactly is.
> My questions:
> 1.Is there any complete documents about module developing?
Not at all. Another partial document is:
By the way, you can also check this modified mod_muc, maybe it
provides the flexibility you want: http://www.ejabberd.im/modular_muc
More information about the ejabberd