diff options
author | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-08 16:23:26 +0000 |
---|---|---|
committer | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-08 16:23:26 +0000 |
commit | e701a1e2adf0453e1a32bce38b1a70a05cd8f06b (patch) | |
tree | eef485c0f76b40dabd8500e09543c2739117883b /src | |
parent | 876a2519d5a952607eb2c998361a10a07577be30 (diff) |
Move more stuff to a module class.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1593 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/events.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/src/events.c b/src/events.c index 006c3273e..17c9903cc 100644 --- a/src/events.c +++ b/src/events.c @@ -512,50 +512,34 @@ int Module::AddEventHook(EvtHook *evh) return status; } -/** - * remove the given message from the IRCD message hash - * @param name the name of the message to remove - * @return MOD_ERR_OK on success, althing else on fail. - **/ -int moduleEventDelHandler(char *name) +int Module::DelEventHandler(const char *name) { EvtMessage *evm; int status; - if (!mod_current_module) { - return MOD_ERR_UNKNOWN; - } evm = findEventHandler(EVENT, name); if (!evm) { return MOD_ERR_NOEXIST; } - status = delEventHandler(EVENT, evm, mod_current_module->name.c_str()); + status = delEventHandler(EVENT, evm, this->name.c_str()); if (debug) { displayEvtMessageFromHash(evm->name); } return status; } -/** - * remove the given message from the IRCD message hash - * @param name the name of the message to remove - * @return MOD_ERR_OK on success, althing else on fail. - **/ -int moduleEventDelHook(const char *name) +int Module::DelEventHook(const char *name) { EvtHook *evh; int status; - if (!mod_current_module) { - return MOD_ERR_UNKNOWN; - } evh = findEventHook(EVENTHOOKS, name); if (!evh) { return MOD_ERR_NOEXIST; } - status = delEventHook(EVENTHOOKS, evh, mod_current_module->name.c_str()); + status = delEventHook(EVENTHOOKS, evh, this->name.c_str()); if (debug) { displayHookFromHash(evh->name); } |