diff options
Diffstat (limited to 'src/modules.c')
-rw-r--r-- | src/modules.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/modules.c b/src/modules.c index 2b411e4d5..2988b9f52 100644 --- a/src/modules.c +++ b/src/modules.c @@ -235,7 +235,7 @@ int encryption_module_init(void) { if (ret != MOD_ERR_OK) alog("ERROR: status: [%d][%s]", ret, ModuleGetErrStr(ret)); else - moduleSetType(findModule(EncModule), ENCRYPTION); + findModule(EncModule)->SetType(ENCRYPTION); mod_current_module = NULL; return ret; } @@ -252,7 +252,7 @@ int protocol_module_init(void) if (ret == MOD_ERR_OK) { - moduleSetType(findModule(IRCDModule), PROTOCOL); + findModule(IRCDModule)->SetType(PROTOCOL); /* This is really NOT the correct place to do config checks, but * as we only have the ircd struct filled here, we have to over * here. -GD @@ -404,6 +404,12 @@ Module::~Module() */ } +void Module::SetType(MODType type) +{ + this->type = type; +} + + /** * Add the module to the list of currently loaded modules. * @param m the currently loaded module @@ -781,11 +787,6 @@ int unloadModule(Module * m, User * u) } } -void moduleSetType(Module *m, MODType type) -{ - m->type = type; -} - /** * Prepare a module to be unloaded. * Remove all commands and messages this module is providing, and delete |