diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-04 17:03:10 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-04 17:03:10 +0000 |
commit | 6115897d2689a19fcf6f68ebd71d65fa56b4dbb5 (patch) | |
tree | 84f2ed6ebb7fd326502437033e5ac3cf1888f37e /.inspircd.inc | |
parent | 3e52f21044fcc8f2513cbd6a2cad6f481188ae49 (diff) |
Fix for bug #177, generate the version string at configure time and write it into the .inspircd.inc,
then when running the ./inspircd, output the string, this way we dont need the source code to hand to
report the version. (btw special, the doctor has cured you of perlprogramophobia)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5841 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to '.inspircd.inc')
-rw-r--r-- | .inspircd.inc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/.inspircd.inc b/.inspircd.inc index d1ea383a3..cd3ffe6e3 100644 --- a/.inspircd.inc +++ b/.inspircd.inc @@ -15,11 +15,12 @@ # I HATE PERL.. kthxbye # --------------------------------------------------- -my $basepath = "@BASE_DIR@"; -my $confpath = "@CONFIG_DIR@/"; -my $binpath = "@BINARY_DIR@"; -my $libpath = "@LIBRARY_DIR@"; -my $executable = "@EXECUTABLE@"; +my $basepath = "@BASE_DIR@"; +my $confpath = "@CONFIG_DIR@/"; +my $binpath = "@BINARY_DIR@"; +my $libpath = "@LIBRARY_DIR@"; +my $executable = "@EXECUTABLE@"; +my $version = "@VERSION@"; my @filesparsed; # Lets see what they want to do.. Set the variable (Cause i'm a lazy coder) @@ -59,6 +60,11 @@ if ($arg eq "cron") { exit(); } +if ($arg eq "version") { + print "InspIRCd version: $version\n"; + exit(); +} + if ($arg eq "restart") { stop(); unlink($pidfile) if (-e $pidfile); |