summaryrefslogtreecommitdiff
path: root/src/module.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/module.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/module.cpp')
-rw-r--r--src/module.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/module.cpp b/src/module.cpp
index 08d1a1cf0..7179d8bdf 100644
--- a/src/module.cpp
+++ b/src/module.cpp
@@ -31,6 +31,8 @@ Module::Module(const std::string &mname, const std::string &creator)
this->type = THIRD;
this->handle = NULL;
+ this->permanent = false;
+
for (int i = 0; i < NUM_LANGS; i++)
{
this->lang[i].argc = 0;
@@ -210,6 +212,16 @@ void Module::SetType(MODType ntype)
this->type = ntype;
}
+void Module::SetPermanent(bool state)
+{
+ this->permanent = state;
+}
+
+bool Module::GetPermanent()
+{
+ return this->permanent;
+}
+
void Module::SetVersion(const std::string &nversion)
{
this->version = nversion;