aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Mitchell <jeff@jefferai.org>2010-05-29 18:52:27 -0400
committerJeff Mitchell <jeff@jefferai.org>2010-05-29 18:52:27 -0400
commitebe44ba7572cf90f92fbedf709d4d8f753beb204 (patch)
treee83421967ce97a11805cf273a1e85b6c52c73063
parent58a4cad9f2b70eedbef8cc7e85d1e18e2e3c8b7d (diff)
downloadprosody-ebe44ba7572cf90f92fbedf709d4d8f753beb204.tar.gz
prosody-ebe44ba7572cf90f92fbedf709d4d8f753beb204.zip
Add jid support for motd
-rw-r--r--plugins/mod_motd.lua3
1 files changed, 2 insertions, 1 deletions
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);