Comparison

core/modulemanager.lua @ 1253:60156584c442

modulemanager: Stopped using core.eventmanager in module:fire_event
author Waqas Hussain <waqas20@gmail.com>
date Sun, 31 May 2009 01:17:19 +0500
parent 1250:ef053ab86f5e
child 1259:6bd11bca9725
comparison
equal deleted inserted replaced
1252:350534579ba3 1253:60156584c442
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(...); 355 return (hosts[self.host] or prosody).events.fire_event(...);
356 if r ~= nil then return r; end
357 return eventmanager.fire_event(...);
358 end 356 end
359 357
360 function api:hook(event, handler) 358 function api:hook(event, handler)
361 (hosts[self.host] or prosody).events.add_handler(event, handler); 359 (hosts[self.host] or prosody).events.add_handler(event, handler);
362 end 360 end