mod_motd: Don't trigger on directed presence or stanzas from s2s.
--- a/plugins/mod_motd.lua Fri Oct 12 18:49:22 2012 +0200
+++ b/plugins/mod_motd.lua Sat Oct 13 15:21:59 2012 +0200
@@ -20,7 +20,8 @@
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);