Closed ytkang closed 6 years ago
I made pull request about this. https://github.com/processone/ejabberd-contrib/pull/253
@zinid Hi, Thank you for your fast response.
I have a question about this module, How Can i filter word "kkk" If I have "kk" in blacklists.txt? It seems only filter "kk" now.
in "ejabberdctl module_install mod_pottymouth"
First, I got this error
/root/.ejabberd-modules/sources/ejabberd-contrib/mod_pottymouth/src/mod_pottymouth.erl:5: can't find include file "ejabberd.hrl" /root/.ejabberd-modules/sources/ejabberd-contrib/mod_pottymouth/src/mod_pottymouth.erl:3: Warning: undefined callback function mod_options/1 (behaviour 'gen_mod') Error: {compilation_failed,"/root/.ejabberd-modules/sources/ejabberd-contrib/mod_pottymouth/src/mod_pottymouth.erl"}
so, I removed include ("ejabberd.hrl")
After this, I got new error.
/root/.ejabberd-modules/sources/ejabberd-contrib/mod_pottymouth/src/mod_pottymouth.erl:3: Warning: undefined callback function mod_options/1 (behaviour 'gen_mod') Failed RPC connection to the node ejabberd@localhost: {'EXIT', {function_clause, [{normalize_leet_gen_server, loadCharMapConfig, [{ok,[]}], [{file, "/root/.ejabberd-modules/sources/ejabberd-contrib/mod_pottymouth/src/normalize_leet_gen_server.erl"}, {line,33}]},
so, I added mod_options on mod_pottymouth.erl
mod_options(_) -> [{blacklists, []},{charmaps, []}].