From 7571ca327e33f649f954604396c1d97c2714b0e0 Mon Sep 17 00:00:00 2001 From: "Robin Burchell w00t@inspircd.org" Date: Sat, 8 Nov 2008 01:25:59 +0000 Subject: moduleAddEventHook -> Module::AddEventHook, even though this seems to be unused.. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1586 5417fbe8-f217-4b02-8779-1006273d7864 --- src/events.c | 37 +++++++++++-------------------------- 1 file changed, 11 insertions(+), 26 deletions(-) (limited to 'src') diff --git a/src/events.c b/src/events.c index 65338b166..f8a6f1601 100644 --- a/src/events.c +++ b/src/events.c @@ -511,37 +511,22 @@ int moduleAddEventHandler(EvtMessage * evm) return status; } -/** - * Add a module message to the IRCD message hash - * @param m the Message to add - * @param pos the Position to add the message to, e.g. MOD_HEAD, MOD_TAIL, MOD_UNIQUE - * @return MOD_ERR_OK on success, althing else on fail. - **/ -int moduleAddEventHook(EvtHook * evh) +int Module::AddEventHook(EvtHook *evh) { - int status; + int status; - if (!evh) { - return MOD_ERR_PARAMS; - } + if (!evh) + return MOD_ERR_PARAMS; - if ((mod_current_module_name) && (!mod_current_module)) { - mod_current_module = findModule(mod_current_module_name); - } + evh->core = 0; + if (!evh->mod_name) + evh->mod_name = sstrdup(this->name.c_str()); - if (!mod_current_module) { - return MOD_ERR_UNKNOWN; - } /* shouldnt happen */ - evh->core = 0; - if (!evh->mod_name) { - evh->mod_name = sstrdup(mod_current_module->name.c_str()); - } + status = addEventHook(EVENTHOOKS, evh); + if (debug) + displayHookFromHash(evh->name); - status = addEventHook(EVENTHOOKS, evh); - if (debug) { - displayHookFromHash(evh->name); - } - return status; + return status; } /** -- cgit