Software /
code /
prosody
Comparison
plugins/mod_announce.lua @ 3275:05c1d8269043
mod_announce: Changed a global variable to local.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Fri, 18 Jun 2010 14:19:09 +0500 |
parent | 3228:65e5dfcf5a9f |
child | 3276:4e44469b0583 |
comparison
equal
deleted
inserted
replaced
3274:366ac5e47096 | 3275:05c1d8269043 |
---|---|
10 | 10 |
11 local is_admin = require "core.usermanager".is_admin; | 11 local is_admin = require "core.usermanager".is_admin; |
12 local admins = set.new(config.get(module:get_host(), "core", "admins")); | 12 local admins = set.new(config.get(module:get_host(), "core", "admins")); |
13 | 13 |
14 function send_to_online(message, server) | 14 function send_to_online(message, server) |
15 local sessions; | |
15 if server then | 16 if server then |
16 sessions = { [server] = hosts[server] }; | 17 sessions = { [server] = hosts[server] }; |
17 else | 18 else |
18 sessions = hosts; | 19 sessions = hosts; |
19 end | 20 end |