processone / ejabberd-contrib

Growing and curated ejabberd contributions repository - PR or ask to join !
http://ejabberd.im
250 stars 140 forks source link

Cannot install mod_pottymouth #252

Closed ytkang closed 6 years ago

ytkang commented 6 years ago

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, []}].

ytkang commented 6 years ago

I made pull request about this. https://github.com/processone/ejabberd-contrib/pull/253

ytkang commented 6 years ago

@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.