mirror of
https://github.com/danbulant/flying-squid
synced 2026-07-06 03:31:10 +00:00
fix /help <command>
This commit is contained in:
parent
f4a168cffb
commit
8d7523a995
1 changed files with 3 additions and 4 deletions
|
|
@ -9,10 +9,9 @@ module.exports.player=function(player) {
|
||||||
var hash = player.commands.hash;
|
var hash = player.commands.hash;
|
||||||
|
|
||||||
if(c) {
|
if(c) {
|
||||||
var res = player.commands.find(params[0])[0];
|
var f=player.commands.find(c);
|
||||||
|
if(f==undefined || f.length==0) return 'Command '+c+' not found';
|
||||||
var help = res.params.help && res.params.help(params);
|
return f[0].params.usage + ' ' + f[0].params.info;
|
||||||
return help ? '' + help : 'Information not found';
|
|
||||||
} else {
|
} else {
|
||||||
var used = [];
|
var used = [];
|
||||||
for(var key in hash) {
|
for(var key in hash) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue