Mercurial > prosody-hg
comparison plugins/mod_announce.lua @ 5370:7838acadb0fa
mod_announce, mod_auth_anonymous, mod_c2s, mod_c2s, mod_component, mod_iq, mod_message, mod_presence, mod_tls: Access prosody.{hosts,bare_sessions,full_sessions} instead of the old globals
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 23 Mar 2013 01:27:16 +0100 |
| parents | 88fb94df9b18 |
| children | bd0ff8ae98a8 |
comparison
equal
deleted
inserted
replaced
| 5368:ab31dbb3a415 | 5370:7838acadb0fa |
|---|---|
| 6 -- COPYING file in the source package for more information. | 6 -- COPYING file in the source package for more information. |
| 7 -- | 7 -- |
| 8 | 8 |
| 9 local st, jid = require "util.stanza", require "util.jid"; | 9 local st, jid = require "util.stanza", require "util.jid"; |
| 10 | 10 |
| 11 local hosts = prosody.hosts; | |
| 11 local is_admin = require "core.usermanager".is_admin; | 12 local is_admin = require "core.usermanager".is_admin; |
| 12 | 13 |
| 13 function send_to_online(message, host) | 14 function send_to_online(message, host) |
| 14 local sessions; | 15 local sessions; |
| 15 if host then | 16 if host then |
