diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-01-14 18:17:08 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-01-14 18:17:08 +0000 |
commit | 601d67fd5f5a9e430a59a1930382eae67eb39fb4 (patch) | |
tree | 7dd07ff306540097f70b6689feca83f60ac002a5 /include | |
parent | 7866c42d8f80723d07cf38ed9413857164b55e00 (diff) |
Move revision information from Version object to a static symbol
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12256 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r-- | include/dynamic.h | 5 | ||||
-rw-r--r-- | include/modules.h | 16 |
2 files changed, 15 insertions, 6 deletions
diff --git a/include/dynamic.h b/include/dynamic.h index ccb22f8cc..01bdcdec5 100644 --- a/include/dynamic.h +++ b/include/dynamic.h @@ -45,7 +45,10 @@ class CoreExport DLLManager : public classbase /** Return a module by calling the init function */ - Module* callInit(); + Module* CallInit(); + + /** Get detailed version information from the module file */ + std::string GetVersion(); }; #endif diff --git a/include/modules.h b/include/modules.h index f980caf41..a3f596091 100644 --- a/include/modules.h +++ b/include/modules.h @@ -180,17 +180,22 @@ class CoreExport VersionBase /** Module description */ const std::string description; - /** Version information. - */ - const std::string version; /** Flags */ const int Flags; + /** Server linking description string */ + const std::string link_data; + /** Initialize version class */ - VersionBase(const std::string &desc, int flags = VF_NONE, const std::string& src_rev = VERSION " r" REVISION); + VersionBase(const std::string &desc, int flags = VF_NONE); + + virtual ~VersionBase() {} + + /** Return true if the module can link (default is identity comparison) */ + virtual bool CanLink(const std::string& other_data); }; typedef VersionBase<API_VERSION> Version; @@ -1690,7 +1695,8 @@ struct AllModuleList { extern "C" DllExport Module * MODULE_INIT_SYM() \ { \ return new y; \ - } + } \ + extern "C" const char inspircd_src_version[] = VERSION " r" REVISION; #endif #define COMMAND_INIT(c) MODULE_INIT(CommandModule<c>) |