]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Include VERSION/REVISION information in module version tag, so that we do no longer...
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Wed, 2 Sep 2009 18:33:16 +0000 (18:33 +0000)
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Wed, 2 Sep 2009 18:33:16 +0000 (18:33 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11666 e03df62e-2008-0410-955e-edbf42e46eb7

include/inspircd.h
include/modules.h
make/calcdep.pl
src/modules.cpp

index f16a1a40dcb9dc8cc467dee791b39005b89f241f..92e446e033a50946677dee57ea9fa426d66a1916 100644 (file)
@@ -74,6 +74,7 @@ typedef std::vector< KeyVal > KeyValList;
 typedef std::multimap< std::string, KeyValList > ConfigDataHash;
 
 #include "inspircd_config.h"
+#include "inspircd_version.h"
 #include "numerics.h"
 #include "uid.h"
 #include "users.h"
index ce93f4b16cb84e38a188c074b18b075a3cfe4b02..86f77d2183d19914498e32218f7d42f72907b653 100644 (file)
@@ -277,7 +277,7 @@ class CoreExport Version : public classbase
  public:
        /** Version information.
         */
-       std::string version;
+       const std::string version;
 
        /** Flags and API version
         */
@@ -285,7 +285,8 @@ class CoreExport Version : public classbase
 
        /** Initialize version class
         */
-       Version(const std::string &sversion, int flags, int api_ver);
+       Version(const std::string &customver, int flags,
+               int api_ver = API_VERSION, const std::string& src_rev = VERSION " r" REVISION);
 };
 
 /** The ModuleMessage class is the base class of Request and Event
index 484c98cbd86079a12850f0a84039afd878cdd226..c2e9b951099a7f76b63bd247184ea1e807621813 100755 (executable)
@@ -16,6 +16,7 @@ sub gendep {
        while (<$in>) {
                if (/^\s*#\s*include\s*"([^"]+)"/) {
                        my $inc = $1;
+                       next if $inc eq 'inspircd_version.h' && $f eq '../include/inspircd.h';
                        my $found = 0;
                        for my $loc ("$basedir/$inc", "../include/$inc") {
                                next unless -e $loc;
index 2e3623b4af11f35182231d5782971b9feee67ba3..f0ff37726af55febf70ef6be96a3e76920bfe659 100644 (file)
@@ -27,8 +27,8 @@
 
 
 // version is a simple class for holding a modules version number
-Version::Version(const std::string &sversion, int flags, int api_ver)
-: version(sversion), Flags(flags), API(api_ver)
+Version::Version(const std::string &modv, int flags, int api_ver, const std::string& rev)
+: version(modv + " " + rev), Flags(flags), API(api_ver)
 {
 }