summaryrefslogtreecommitdiff
path: root/src/modulemanager.cpp
diff options
context:
space:
mode:
authorrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-14 20:28:23 +0000
committerrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-14 20:28:23 +0000
commitbb47ab8f4123149a7ee28a0abf6edc1e97bc2be7 (patch)
treecf67e20e199d4dfeab9bf6fef4482a09f6dceeb2 /src/modulemanager.cpp
parent10dcb3d8a44d741f5a16853016a1118664b75e8a (diff)
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
Diffstat (limited to 'src/modulemanager.cpp')
-rw-r--r--src/modulemanager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modulemanager.cpp b/src/modulemanager.cpp
index 529a2e799..2a01351e1 100644
--- a/src/modulemanager.cpp
+++ b/src/modulemanager.cpp
@@ -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);