Software /
code /
prosody
Comparison
core/modulemanager.lua @ 4533:c6480d17be1e
modulemanager: Drop unnecessary prosody_events local
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 22 Jan 2012 18:47:33 +0000 |
parent | 4532:d8dbf569766c |
child | 4534:7a0a31c4f6c5 |
comparison
equal
deleted
inserted
replaced
4532:d8dbf569766c | 4533:c6480d17be1e |
---|---|
13 local st = require "util.stanza"; | 13 local st = require "util.stanza"; |
14 local pluginloader = require "util.pluginloader"; | 14 local pluginloader = require "util.pluginloader"; |
15 | 15 |
16 local hosts = hosts; | 16 local hosts = hosts; |
17 local prosody = prosody; | 17 local prosody = prosody; |
18 local prosody_events = prosody.events; | |
19 | 18 |
20 local loadfile, pcall, xpcall = loadfile, pcall, xpcall; | 19 local loadfile, pcall, xpcall = loadfile, pcall, xpcall; |
21 local setmetatable, setfenv, getfenv = setmetatable, setfenv, getfenv; | 20 local setmetatable, setfenv, getfenv = setmetatable, setfenv, getfenv; |
22 local pairs, ipairs = pairs, ipairs; | 21 local pairs, ipairs = pairs, ipairs; |
23 local t_insert, t_concat = table.insert, table.concat; | 22 local t_insert, t_concat = table.insert, table.concat; |
85 end | 84 end |
86 for module in modules do | 85 for module in modules do |
87 load(host, module); | 86 load(host, module); |
88 end | 87 end |
89 end | 88 end |
90 prosody_events.add_handler("host-activated", load_modules_for_host); | 89 prosody.events.add_handler("host-activated", load_modules_for_host); |
91 -- | |
92 | 90 |
93 --- Private helpers --- | 91 --- Private helpers --- |
94 | 92 |
95 local function do_unload_module(host, name) | 93 local function do_unload_module(host, name) |
96 local mod = get_module(host, name); | 94 local mod = get_module(host, name); |