Here I found the code:
erlc -I ~/ejabberd-2.1.13/lib/ejabberd-2.1.13/include -pa ~/ejabberd-2.1.13/lib/ejabberd-2.1.13/ebin mod_my.erl
But it did not work?
Here are steps to add your custom module into ejabberd
Just drop the module in the ejabberd's src/ folder then "make". Nothing special needed to compile it.
These are the Instructions based on Ejabberd recommendation
1) Form the folder structure like below (refer any module from -- https://github.com/processone/ejabberd-contrib ).
sources
│
│───conf
│ └───modulename.yml
│───src
│ └───modulename.erl
│───README.txt
│───COPYING
│───modulename.spec
2) Add your module folder structure to ejabberd user home directory (check ejabberdctl.cfg for CONTRIB_MODULES_PATH param).
3) Type command ejabberdctl modules_available it will list your module
4) Type ejabberdctl module_install module_name command
For Reference https://docs.ejabberd.im/developer/extending-ejabberd/modules/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.