mirror of
https://github.com/anope/anope.git
synced 2026-06-25 03:56:40 +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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user