Software /
code /
prosody
Changeset
5169:ed2d64fb7301
mod_motd: Don't trigger on directed presence or stanzas from s2s.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 13 Oct 2012 15:21:59 +0200 |
parents | 5168:46fc0eff10b4 |
children | 5170:3eaf4fc58902 |
files | plugins/mod_motd.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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);