diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-11-11 17:01:00 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-11-11 17:01:00 +0000 |
commit | 5e1f2c1728b200951c0f192f2e2c6b83d53c879c (patch) | |
tree | f9654b9cf65fa8548158dde177da7723c807753d /include/modules.h | |
parent | 7eebbe7da15a834c717f0fa279a300ee18c08b04 (diff) |
In prep for remote includes, configuration reading is now two-pass.
Note that theres an important part missing from here, there can be a NON-BLOCKING delay between the start of pass 2 and the files being available for download.
At this point, ServerConfig::Read() should probably return an ENOTREADY or such at which point it gets monitored for ready state. The socket engine is ready at this point
so we can poll the socket engine for it. In the case of startup, the socket engine blocks in a private loop, its no good booting the ircd till we have a complete config!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8565 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/modules.h')
-rw-r--r-- | include/modules.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/modules.h b/include/modules.h index 5190563ef..a3cac1486 100644 --- a/include/modules.h +++ b/include/modules.h @@ -401,10 +401,12 @@ enum Implementation I_OnRawSocketAccept, I_OnRawSocketClose, I_OnRawSocketWrite, I_OnRawSocketRead, I_OnChangeLocalUserGECOS, I_OnUserRegister, I_OnOperCompare, I_OnChannelDelete, I_OnPostOper, I_OnSyncOtherMetaData, I_OnSetAway, I_OnCancelAway, I_OnUserList, I_OnPostCommand, I_OnPostJoin, I_OnWhoisLine, I_OnBuildExemptList, I_OnRawSocketConnect, I_OnGarbageCollect, I_OnBufferFlushed, - I_OnText, + I_OnText, I_OnReadConfig, I_OnDownloadFile, I_END }; +class ConfigReader; + /** Base class for all InspIRCd modules * This class is the base class for InspIRCd modules. All modules must inherit from this class, * its methods will be called when irc server events occur. class inherited from module must be @@ -434,6 +436,10 @@ class CoreExport Module : public Extensible { } + virtual void OnReadConfig(ServerConfig* config, ConfigReader* coreconf); + + virtual int OnDownloadFile(const std::string &filename, std::stringstream &filedata); + /** Returns the version number of a Module. * The method should return a Version object with its version information assigned via * Version::Version |