Software /
code /
prosody
Comparison
core/modulemanager.lua @ 1250:ef053ab86f5e
modulemanager: module:fire_event now fires on the global and host-specific events objects as well
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 31 May 2009 01:11:48 +0500 |
parent | 1248:9a482f76a20a |
child | 1253:60156584c442 |
comparison
equal
deleted
inserted
replaced
1249:f22ede3e1c28 | 1250:ef053ab86f5e |
---|---|
350 end | 350 end |
351 event_hooks:set(self.host, self.name, name, handler, true); | 351 event_hooks:set(self.host, self.name, name, handler, true); |
352 end | 352 end |
353 | 353 |
354 function api:fire_event(...) | 354 function api:fire_event(...) |
355 local r = (hosts[self.host] or prosody).events.fire_event(...); | |
356 if r ~= nil then return r; end | |
355 return eventmanager.fire_event(...); | 357 return eventmanager.fire_event(...); |
356 end | 358 end |
357 | 359 |
358 function api:hook(event, handler) | 360 function api:hook(event, handler) |
359 (hosts[self.host] or prosody).events.add_handler(event, handler); | 361 (hosts[self.host] or prosody).events.add_handler(event, handler); |