# HG changeset patch # User Matthew Wild # Date 1254304991 -3600 # Node ID 8f1871c1d456f99dcf383ba392cbac3ef46132c2 # Parent 5529d3c8eee775498dc56eb29ff9755d14a73e89 componentmanager: Fire event on component activation diff -r 5529d3c8eee7 -r 8f1871c1d456 core/componentmanager.lua --- a/core/componentmanager.lua Wed Sep 30 11:02:31 2009 +0100 +++ b/core/componentmanager.lua Wed Sep 30 11:03:11 2009 +0100 @@ -14,6 +14,7 @@ local modulemanager = require "core.modulemanager"; local core_route_stanza = core_route_stanza; local jid_split = require "util.jid".split; +local fire_event = require "core.eventmanager".fire_event; local events_new = require "util.events".new; local st = require "util.stanza"; local hosts = hosts; @@ -58,6 +59,7 @@ if not ok then log("error", "Error loading %s component %s: %s", tostring(host_config.core.component_module), tostring(host), tostring(err)); else + fire_event("component-activated", host, host_config); log("debug", "Activated %s component: %s", host_config.core.component_module, host); end end