aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_motd.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2012-10-14 22:53:41 +0200
committerKim Alvefur <zash@zash.se>2012-10-14 22:53:41 +0200
commit07d035d93ce4bb8f9fa19840653654688e3eec8f (patch)
tree0fcfafb96064def71df05ea9765e4141bfc89a1c /plugins/mod_motd.lua
parent575e1581d8280a9b966cc48fa6280125e03f154e (diff)
parent6da5020684d3f7b8ea69afb0c65ea3d8b46f137a (diff)
downloadprosody-07d035d93ce4bb8f9fa19840653654688e3eec8f.tar.gz
prosody-07d035d93ce4bb8f9fa19840653654688e3eec8f.zip
Merge 0.9 -> trunk
Diffstat (limited to 'plugins/mod_motd.lua')
-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 ddde9c78..fea2cb85 100644
--- a/plugins/mod_motd.lua
+++ b/plugins/mod_motd.lua
@@ -20,7 +20,8 @@ motd_text = motd_text:gsub("^%s*(.-)%s*$", "%1"):gsub("\n%s+", "\n"); -- Strip i
module:hook("presence/bare", function (event)
local session, stanza = event.origin, event.stanza;
- if not session.presence and not stanza.attr.type then
+ if session.username and not session.presence
+ and not stanza.attr.type and not stanza.attr.to then
local motd_stanza =
st.message({ to = session.full_jid, from = motd_jid })
:tag("body"):text(motd_text);