From 4b0e7027bf6bf29a45b51733c6335791acd9f92f Mon Sep 17 00:00:00 2001 From: Tony Corbett Date: Sun, 15 May 2016 18:05:52 +0300 Subject: [PATCH] Change version output to work with -v command line argument (#12) Pull Request #70 on MMDVMHost To be honest, thinking about it, I don't think you need the 2>&1 now as I coded the version output to be printed to STDERR - one for you to test ;-) --- include/functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/functions.php b/include/functions.php index 2e76e7c..4e6d75b 100644 --- a/include/functions.php +++ b/include/functions.php @@ -3,8 +3,8 @@ function getMMDVMHostVersion() { // returns creation-time of MMDVMHost as version-number $filename = MMDVMHOSTPATH . "MMDVMHost"; - exec($filename." 2>&1", $output); - return substr($output[1],10,8)." (compiled ".getMMDVMHostFileVersion().")"; + exec($filename." -v 2>&1", $output); + return substr($output[0],18,8)." (compiled ".getMMDVMHostFileVersion().")"; } function getMMDVMHostFileVersion() { @@ -400,4 +400,4 @@ function getActualReflector($logLines, $mode) { $mmdvmconfigs = getMMDVMConfig(); $logLines = getLog(); $lastHeard = getLastHeard($logLines); -?> \ No newline at end of file +?>