]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/dynamic.cpp
Move revision information from Version object to a static symbol
[user/henk/code/inspircd.git] / src / dynamic.cpp
index 719046dbeae0f0c576645b42171bc75c2490dc0d..ebaaa5191ace59dd337ff18faf8834def42a0203 100644 (file)
@@ -45,7 +45,7 @@ union init_t {
        Module* (*fptr)();
 };
 
-Module* DLLManager::callInit()
+Module* DLLManager::CallInit()
 {
        if (!h)
                return NULL;
@@ -60,3 +60,14 @@ Module* DLLManager::callInit()
 
        return (*initfn.fptr)();
 }
+
+std::string DLLManager::GetVersion()
+{
+       if (!h)
+               return "";
+
+       const char* srcver = (char*)dlsym(h, "inspircd_src_version");
+       if (srcver)
+               return srcver;
+       return "Unversioned module";
+}