From 895d2f62475c0f962cdbf90d36196801e759d9c5 Mon Sep 17 00:00:00 2001 From: Darren Date: Mon, 9 Jun 2014 13:29:30 +0100 Subject: [PATCH] Help command in the controlinterface --- server/controlinterface.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/server/controlinterface.js b/server/controlinterface.js index 091bc1f..2bcf32c 100644 --- a/server/controlinterface.js +++ b/server/controlinterface.js @@ -76,6 +76,25 @@ ControlInterface.prototype.addCommand = function(command, fn) { var commands = {}; +commands.help = function(args, raw) { + var help = 'Available commands:\n'; + help += 'help\n'; + help += ' This help menu\n'; + help += 'reconfig\n'; + help += ' Reload the config.js file\n'; + help += 'stats\n'; + help += ' Show connection statistics\n'; + help += 'module list\n'; + help += ' List the loaded server modules\n'; + help += 'module reload module_name\n'; + help += ' Reload the module_name module\n'; + help += 'jumpserver [force] http://kiwi-server.com\n'; + help += ' Tell all connected clients to reconnect to a different kiwi server. If \'force\' is given, they will be forced to reconnect in 5 minutes. \n'; + + this.write(help); +}; + + commands.stats = function(args, raw) { this.write('Connected clients: ' + _.size(global.clients.clients).toString()); this.write('Num. remote hosts: ' + _.size(global.clients.addresses).toString()); -- 2.25.1