From 601d67fd5f5a9e430a59a1930382eae67eb39fb4 Mon Sep 17 00:00:00 2001 From: danieldg Date: Thu, 14 Jan 2010 18:17:08 +0000 Subject: 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 --- src/dynamic.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/dynamic.cpp') 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"; +} -- cgit v1.2.3