refactor: IRC bot .version response (#4355)

* IRCbot more verbose .version response

* Using local_sha instead of git call

* Corrected substr starting position
This commit is contained in:
deutor
2016-09-07 08:33:24 +02:00
committed by Neil Lathwood
parent 58599e95ba
commit 50a02a0fc5

View File

@ -569,7 +569,12 @@ class IRCBot
private function _version($params)
{
return $this->respond($this->config['project_name_version'].', PHP: '.PHP_VERSION);
$versions = version_info(false);
$schema_version = $versions['db_schema'];
$version = substr($versions['local_sha'], 0, 7);
$msg = $this->config['project_name_version'].', Version: '.$version.', DB schema: #'.$schema_version.', PHP: '.PHP_VERSION;
return $this->respond($msg);
}//end _version()