我对 ejabberd 或 MongooseIM(ejabberd 的一个分支)的经验几乎为零,所以请耐心等待。
我想启用 mod_announce 以便我可以广播消息,但源代码树中没有 mod_announce.erl。我确实在源代码的其他地方看到了对 mod_announce 的引用,所以我尝试简单地在配置中启用它:
{mod_private, []},
{mod_roster_kov, []},
{mod_announce, [access, announce]},
{mod_sic, []},
{mod_ping, [{send_pings, true}, {ping_interval, 300}, {timeout_action, kill}]},
但是,现在服务器不会启动。日志说:
2015-03-11 09:21:50.341 [critical] <0.184.0>@gen_mod:start_module:93 Problem starting the module mod_announce for host <<"mydomain.dk">>
options: [{access,true},{announce,true}]
error: undef
[{mod_announce,start,[<<"mydomain.dk">>,[{access,true},{announce,true}]],[]},
{gen_mod,start_module,3,[{file,"src/gen_mod.erl"},{line,82}]},
{lists,foreach,2,[{file,"lists.erl"},{line,1336}]},
{ejabberd_app,start,2,[{file,"src/ejabberd_app.erl"},{line,70}]},
{application_master,start_it_old,4,
[{file,"application_master.erl"},{line,272}]}]
2015-03-11 09:21:50.341 [critical] <0.184.0>@gen_mod:start_module:98 ejabberd initialization was aborted because a module start failed.
The trace is [{mod_announce,start,[<<"mydomain.dk">>,[{access,true},{announce,true}]],[]},{gen_mod,start_module,3,[{file,"src/gen_mod.erl"},{line,82}]},{lists,foreach,2,[{file,"lists.erl"},{line,1336}]},{ejabberd_app,start,2,[{file,"src/ejabberd_app.erl"},{line,70}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,272}]}].
我究竟做错了什么?MongooseIM 中没有 mod_announce 吗?