X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=.inspircd.inc;h=54737fdd78c66fd66611bf6bdb8871566ee14942;hb=4799d8d066114204c5aa8483dace93ccb00850e1;hp=87a162a31b12699a51a3ee03672e678574694b7d;hpb=bc14912c0cce02f6cdd94352935d1ae123a5f9c0;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/.inspircd.inc b/.inspircd.inc index 87a162a31..54737fdd7 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); @@ -77,7 +83,7 @@ if ($arg eq "Cheese-Sandwich") { # If we get here.. bad / no parameters. ### print "Invalid Argument: $arg\n"; -print "Usage: inspircd (start|stop|restart|rehash|status|cron)\n"; +print "Usage: inspircd (start|stop|restart|rehash|status|cron|version)\n"; exit(); ### @@ -236,7 +242,7 @@ sub getpidfile { } } else { # End of includes / No includes found. - return; + return $confpath . "inspircd.pid"; } } }