Comparison

core/modulemanager.lua @ 4804:607414b26c8c

modulemanager: Pass the module's final host (e.g. '*') to the module-loaded event
author Matthew Wild <mwild1@gmail.com>
date Mon, 30 Apr 2012 00:52:43 +0100
parent 4801:83cedf648b46
child 4853:4ca9328e37d5
comparison
equal deleted inserted replaced
4803:39ba097ec641 4804:607414b26c8c
244 244
245 -- Load a module and fire module-loaded event 245 -- Load a module and fire module-loaded event
246 function load(host, name) 246 function load(host, name)
247 local mod, err = do_load_module(host, name); 247 local mod, err = do_load_module(host, name);
248 if mod then 248 if mod then
249 (hosts[mod.module.host] or prosody).events.fire_event("module-loaded", { module = name, host = host }); 249 (hosts[mod.module.host] or prosody).events.fire_event("module-loaded", { module = name, host = mod.module.host });
250 end 250 end
251 return mod, err; 251 return mod, err;
252 end 252 end
253 253
254 -- Unload a module and fire module-unloaded 254 -- Unload a module and fire module-unloaded