在MongooseIM中启用mod_announce

时间:2015-03-11 09:38:29

标签: ejabberd mongoose-im

我对ejabberd或MongooseIM(ejabberd的一个分支)几乎没有经验,所以请耐心等待。

我想启用mod_announce以便我可以广播消息,但源树中没有mod_announce.erl。我确实在源代码的其他地方看到了对mod_announce的引用,所以我只是尝试在config中启用它:

{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吗?

1 个答案:

答案 0 :(得分:0)

错误表示函数调用是undef。这可能意味着该模块不可用。作为一名ejabberd开发人员,我建议您确保安装最新版本的ejabberd(15.02),因为还有更多功能可用(最重要的是可扩展性和健壮性以及许多贡献,对于像mod_admin_extra这样的管理员来说非常方便)。