summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-18 20:06:38 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-18 20:06:38 +0000
commit0f781e55b0bccde1e0aade19065d9ef10a05682a (patch)
tree6d59c846f235a12c6998532b9b6cebaec1b4f890
parent999a6a3972937e4d2a2e65a5452aedef96f1f48a (diff)
Added GetRevision() function returning a long with the internal revision
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@651 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/inspircd.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 0dc824076..00e831b66 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -291,6 +291,19 @@ void chop(char* str)
}
+long GetRevision()
+{
+ char Revision[] = "$Revision$";
+ char *s1 = Revision;
+ char *savept;
+ char *v1 = strtok_r(s1," ",&savept);
+ s1 = savept;
+ char *v2 = strtok_r(s1," ",&savept);
+ s1 = savept;
+ return (long)(atof(v2)*10000);
+}
+
+
std::string getservername()
{
return ServerName;