mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
@ -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()
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user