diff options
Diffstat (limited to 'src/dynamic.cpp')
-rw-r--r-- | src/dynamic.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/dynamic.cpp b/src/dynamic.cpp index 719046dbe..ebaaa5191 100644 --- a/src/dynamic.cpp +++ b/src/dynamic.cpp @@ -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"; +} |