From 0f781e55b0bccde1e0aade19065d9ef10a05682a Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 18 Apr 2004 20:06:38 +0000 Subject: 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 --- src/inspircd.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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; -- cgit v1.2.3