Comparison

plugins/mod_announce.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 4926:58714123f600
child 5076:88fb94df9b18
comparison
equal deleted inserted replaced
5013:ab693eea0869 5014:b2006c1cfa85
23 if host_session.sessions then 23 if host_session.sessions then
24 message.attr.from = hostname; 24 message.attr.from = hostname;
25 for username in pairs(host_session.sessions) do 25 for username in pairs(host_session.sessions) do
26 c = c + 1; 26 c = c + 1;
27 message.attr.to = username.."@"..hostname; 27 message.attr.to = username.."@"..hostname;
28 core_post_stanza(host_session, message); 28 module:send(message);
29 end 29 end
30 end 30 end
31 end 31 end
32 32
33 return c; 33 return c;