Comparison

plugins/mod_motd.lua @ 5014:b2006c1cfa85

mod_announce, mod_motd, mod_pubsub, mod_register, mod_watchregistrations, mod_welcome: Use module:send() instead of core_*_stanza()
author Kim Alvefur <zash@zash.se>
date Thu, 26 Jul 2012 04:35:13 +0200
parent 4654:0975505f5a54
child 5169:ed2d64fb7301
comparison
equal deleted inserted replaced
5013:ab693eea0869 5014:b2006c1cfa85
22 local session, stanza = event.origin, event.stanza; 22 local session, stanza = event.origin, event.stanza;
23 if not session.presence and not stanza.attr.type then 23 if not session.presence and not stanza.attr.type then
24 local motd_stanza = 24 local motd_stanza =
25 st.message({ to = session.full_jid, from = motd_jid }) 25 st.message({ to = session.full_jid, from = motd_jid })
26 :tag("body"):text(motd_text); 26 :tag("body"):text(motd_text);
27 core_route_stanza(hosts[host], motd_stanza); 27 module:send(motd_stanza);
28 module:log("debug", "MOTD send to user %s", session.full_jid); 28 module:log("debug", "MOTD send to user %s", session.full_jid);
29 end 29 end
30 end, 1); 30 end, 1);