summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-08 01:25:59 +0000
committerRobin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-08 01:25:59 +0000
commit7571ca327e33f649f954604396c1d97c2714b0e0 (patch)
tree0db2458070a843a1ea53397b2a314bad75476892 /src
parentd2e5ef67e3cd1bab3af02fabc521533fda2d9da8 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/events.c37
1 files changed, 11 insertions, 26 deletions
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;
}
/**