mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
List external commands in help. Allow reload of external commands (#12137)
This commit is contained in:
@@ -657,10 +657,14 @@ class IRCBot
|
||||
|
||||
//end _auth()
|
||||
|
||||
private function _reload()
|
||||
private function _reload($params)
|
||||
{
|
||||
if ($this->user['level'] == 10) {
|
||||
$new_config = Config::reload();
|
||||
if ($params == 'external') {
|
||||
$this->respond('Reloading external scripts.');
|
||||
return $this->loadExternal();
|
||||
}
|
||||
$new_config = Config::load();
|
||||
$this->respond('Reloading configuration & defaults');
|
||||
if ($new_config != $this->config) {
|
||||
return $this->__construct();
|
||||
@@ -698,12 +702,11 @@ class IRCBot
|
||||
|
||||
private function _help($params)
|
||||
{
|
||||
foreach ($this->commands as $cmd) {
|
||||
$msg .= ', ' . $cmd;
|
||||
$msg = join(', ', $this->commands);
|
||||
if (count($this->external) > 0) {
|
||||
$msg .= ', '. join(', ', array_keys($this->external));
|
||||
}
|
||||
|
||||
$msg = substr($msg, 2);
|
||||
|
||||
return $this->respond("Available commands: $msg");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user