Mercurial > prosody-hg
comparison plugins/mod_announce.lua @ 3202:1a8a5b89a5ad
Merge 0.7->trunk
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Wed, 09 Jun 2010 01:11:12 +0100 |
| parents | 0badae62de28 |
| children | 65e5dfcf5a9f |
comparison
equal
deleted
inserted
replaced
| 3197:f1db45e89317 | 3202:1a8a5b89a5ad |
|---|---|
| 20 end | 20 end |
| 21 | 21 |
| 22 if not is_admin(stanza.attr.from) then | 22 if not is_admin(stanza.attr.from) then |
| 23 -- Not an admin? Not allowed! | 23 -- Not an admin? Not allowed! |
| 24 module:log("warn", "Non-admin %s tried to send server announcement", tostring(jid.bare(stanza.attr.from))); | 24 module:log("warn", "Non-admin %s tried to send server announcement", tostring(jid.bare(stanza.attr.from))); |
| 25 origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); | |
| 26 return; | 25 return; |
| 27 end | 26 end |
| 28 | 27 |
| 29 module:log("info", "Sending server announcement to all online users"); | 28 module:log("info", "Sending server announcement to all online users"); |
| 30 local host_session = hosts[host]; | 29 local host_session = hosts[host]; |
