X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=plugins%2Fmod_motd.lua;h=f323e606e50af903220d0fb105d83e415035ccfb;hb=cebf72aab6f90334f3b3ece7d664e01b185bcfad;hp=500b4a4612f6847b059e38623e4f6bf255ce19d8;hpb=78a022008cc5f79aa678f58158c4e10c3a445a28;p=prosody.git diff --git a/plugins/mod_motd.lua b/plugins/mod_motd.lua index 500b4a46..f323e606 100644 --- a/plugins/mod_motd.lua +++ b/plugins/mod_motd.lua @@ -9,6 +9,7 @@ local host = module:get_host(); local motd_text = module:get_option("motd_text") or "MOTD: (blank)"; +local motd_jid = module:get_option("motd_jid") or host; local st = require "util.stanza"; @@ -16,7 +17,7 @@ module:hook("resource-bind", function (event) local session = event.session; local motd_stanza = - st.message({ to = session.username..'@'..session.host, from = host }) + st.message({ to = session.username..'@'..session.host, from = motd_jid }) :tag("body"):text(motd_text); core_route_stanza(hosts[host], motd_stanza); module:log("debug", "MOTD send to user %s@%s", session.username, session.host);