mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 18:49:03 -04:00
Document ConfigStatus and add a way to detect the initial load.
This commit is contained in:
parent
78f9c57211
commit
5cf6f65044
@ -490,13 +490,23 @@ class CoreExport ConfigReaderThread : public Thread
|
||||
bool IsDone() { return done; }
|
||||
};
|
||||
|
||||
/** Represents the status of a config load. */
|
||||
class CoreExport ConfigStatus
|
||||
{
|
||||
public:
|
||||
/** Whether this is the initial config load. */
|
||||
bool const initial;
|
||||
|
||||
/** The user who initiated the config load or NULL if not initiated by a user. */
|
||||
User* const srcuser;
|
||||
|
||||
ConfigStatus(User* user = NULL)
|
||||
: srcuser(user)
|
||||
/** Initializes a new instance of the ConfigStatus class.
|
||||
* @param user The user who initiated the config load or NULL if not initiated by a user.
|
||||
* @param isinitial Whether this is the initial config load.
|
||||
*/
|
||||
ConfigStatus(User* user = NULL, bool isinitial = false)
|
||||
: initial(isinitial)
|
||||
, srcuser(user)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
@ -507,7 +507,7 @@ void ModuleManager::LoadAll()
|
||||
}
|
||||
|
||||
this->NewServices = NULL;
|
||||
ConfigStatus confstatus;
|
||||
ConfigStatus confstatus(NULL, true);
|
||||
|
||||
// Step 3: Read the configuration for the modules. This must be done as part of
|
||||
// its own step so that services provided by modules can be registered before
|
||||
|
Loading…
x
Reference in New Issue
Block a user