# HG changeset patch # User Kim Alvefur # Date 1350134519 -7200 # Node ID ed2d64fb73015f6ce7daced3767f48284b20f386 # Parent 46fc0eff10b4a389b6216fdbaa87303f95a6b22f mod_motd: Don't trigger on directed presence or stanzas from s2s. diff -r 46fc0eff10b4 -r ed2d64fb7301 plugins/mod_motd.lua --- 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);