modulemanager: Pass the module's final host (e.g. '*') to the module-loaded event
authorMatthew Wild <mwild1@gmail.com>
Mon, 30 Apr 2012 00:52:43 +0100
changeset 4804 607414b26c8c
parent 4803 39ba097ec641
child 4805 1aeece2cc814
modulemanager: Pass the module's final host (e.g. '*') to the module-loaded event
core/modulemanager.lua
--- a/core/modulemanager.lua	Mon Apr 30 00:42:02 2012 +0100
+++ b/core/modulemanager.lua	Mon Apr 30 00:52:43 2012 +0100
@@ -246,7 +246,7 @@
 function load(host, name)
 	local mod, err = do_load_module(host, name);
 	if mod then
-		(hosts[mod.module.host] or prosody).events.fire_event("module-loaded", { module = name, host = host });
+		(hosts[mod.module.host] or prosody).events.fire_event("module-loaded", { module = name, host = mod.module.host });
 	end
 	return mod, err;
 end