From 67bd2c6b2da0d66dc7874dabbc8c9d2136efeb94 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 19 Dec 2012 09:21:25 -0500 Subject: [PATCH] Add version flags for debug, git, and Windows --- src/misc.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/misc.cpp b/src/misc.cpp index 3f74888ee..93aae54a6 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -582,7 +582,23 @@ Anope::string Anope::VersionShort() Anope::string Anope::VersionBuildString() { - return "build #" + stringify(BUILD) + ", compiled " + Anope::compiled; + Anope::string s = "build #" + stringify(BUILD) + ", compiled " + Anope::compiled; + Anope::string flags; + +#ifdef DEBUG_BUILD + flags += "D"; +#endif +#ifdef VERSION_GIT + flags += "G"; +#endif +#ifdef _WIN32 + flags += "W"; +#endif + + if (!flags.empty()) + s += ", flags " + flags; + + return s; } int Anope::VersionMajor() { return VERSION_MAJOR; }