Writing your own ejabberd Module
Coming soon: What is ejabberd? What is erlang? Installation details. I will start with writing the ejabberd module first. Once you have done all the installations: sudo make sudo make install sudo ejabberdctl start sudo ejabberdctl stop You can check the status using: sudo ejabberdctl status You can locate logs at: (With default installation) /var/log/ejabberd All config related changes will be mainly done at: /etc/ejabberd/ejabberd.yml You will need a basic understanding of erlang. You can take a short crash course at: http://www.erlang.org/course/course.html This is a good reference. Go to your ejabberd-15.07/src directory. This is where you will write the hook for your ejabberd server. Create a file, say mod_changeBody.erl. Your module name and file name should be same. Add the following basic contents into your erl file: -module(mod_changeBody). -behavior(gen_mod). -include("ejabberd.hrl"). -include("logger.hrl"). -expo...
Comments