mirror of
https://github.com/anope/anope.git
synced 2026-06-25 03:46:36 +02:00
Add Module::SetPermanent() and Module::GetPermanent(), used to mark a module as not unloadable.
Used for os_modunload, as unloading it would cause issues. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1679 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
@@ -229,7 +229,7 @@ int ModuleManager::LoadModule(const std::string &modname, User * u)
|
||||
return MOD_ERR_OK;
|
||||
}
|
||||
|
||||
int ModuleManager::UnloadModule(Module * m, User * u)
|
||||
int ModuleManager::UnloadModule(Module *m, User *u)
|
||||
{
|
||||
if (!m || !m->handle)
|
||||
{
|
||||
@@ -238,7 +238,7 @@ int ModuleManager::UnloadModule(Module * m, User * u)
|
||||
return MOD_ERR_PARAMS;
|
||||
}
|
||||
|
||||
if (m->type == PROTOCOL || m->type == ENCRYPTION)
|
||||
if (m->GetPermanent() || m->type == PROTOCOL || m->type == ENCRYPTION)
|
||||
{
|
||||
if (u)
|
||||
notice_lang(s_OperServ, u, OPER_MODULE_NO_UNLOAD);
|
||||
|
||||
Reference in New Issue
Block a user