modulemanager: module:fire_event now fires on the global and host-specific events objects as well

Sun, 31 May 2009 01:11:48 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Sun, 31 May 2009 01:11:48 +0500
changeset 1250
ef053ab86f5e
parent 1249
f22ede3e1c28
child 1251
302582b827ed

modulemanager: module:fire_event now fires on the global and host-specific events objects as well

core/modulemanager.lua file | annotate | diff | comparison | revisions
--- a/core/modulemanager.lua	Sun May 31 01:01:52 2009 +0500
+++ b/core/modulemanager.lua	Sun May 31 01:11:48 2009 +0500
@@ -352,6 +352,8 @@
 end
 
 function api:fire_event(...)
+	local r = (hosts[self.host] or prosody).events.fire_event(...);
+	if r ~= nil then return r; end
 	return eventmanager.fire_event(...);
 end
 

mercurial