mirror of
https://github.com/anope/anope.git
synced 2026-07-07 01:03:13 +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:
@@ -136,6 +136,8 @@ struct ModuleLang_ {
|
||||
*/
|
||||
CoreExport class Module
|
||||
{
|
||||
private:
|
||||
bool permanent;
|
||||
public:
|
||||
/** The module name (e.g. os_modload)
|
||||
*/
|
||||
@@ -177,6 +179,20 @@ CoreExport class Module
|
||||
*/
|
||||
void SetType(MODType type);
|
||||
|
||||
/** Toggles the permanent flag on a module. If a module is permanent,
|
||||
* then it may not be unloaded.
|
||||
*
|
||||
* Naturally, this setting should be used sparingly!
|
||||
*
|
||||
* @param state True if this module should be permanent, false else.
|
||||
*/
|
||||
void SetPermanent(bool state);
|
||||
|
||||
/** Retrieves whether or not a given module is permanent.
|
||||
* @return true if the module is permanent, false else.
|
||||
*/
|
||||
bool GetPermanent();
|
||||
|
||||
/** Set the modules version info.
|
||||
* @param version the version of the module
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user