Message of the Day (motd) question

Hi, I'm looking to setup a message of the day that will display every time a user logs into ejabberd but the default apparently is only to display if the motd changes. Is there a way to change this behaviour?

Thanks.

With this change, the MOTD

With this change, the MOTD will be sent to each user every time he logins:

--- a/src/mod_announce.erl
+++ b/src/mod_announce.erl
@@ -824,8 +824,6 @@ send_motd(#jid{luser = LUser, lserver = LServer} = JID) ->
        [#motd{packet = Packet}] ->
            US = {LUser, LServer},
            case catch mnesia:dirty_read({motd_users, US}) of
-               [#motd_users{}] ->
-                   ok;
                _ ->
                    Local = jlib:make_jid("", LServer, ""),
                    ejabberd_router:route(Local, JID, Packet),

I take it I'll need to have

I take it I'll need to have installed from downloading the source and compiling it rather than just downloading the Linux x86 64bit installer? There's no ejabberd.cfg option to change it?

No, you just need to get the

No, you just need to get the source, and there modify and recompile just one module:
erlc mod_announce.erl
Then you need to replace the original mod_announce.beam with the new compiled one.

Ah, thanks to you both.

Ah, thanks to you both.

Syndicate content