diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-18 20:06:38 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-18 20:06:38 +0000 |
commit | 0f781e55b0bccde1e0aade19065d9ef10a05682a (patch) | |
tree | 6d59c846f235a12c6998532b9b6cebaec1b4f890 | |
parent | 999a6a3972937e4d2a2e65a5452aedef96f1f48a (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.cpp | 13 |
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; |