If fantasy HELP is used, only display fantasy commands, if private HELP is used, only display private commands.
This commit is contained in:
1 parent
3e83a47e12
commit
34c0e63971
2 files changed
+12
-1
No files matched your search
@@ -3,6 +3,8 @@ Auto IRC Bot 3.0: Change Log
|
||||
|
||||
3.0 Indev
|
||||
==================================================================
|
||||
* If fantasy HELP is used, only display fantasy commands, if
|
||||
private HELP is used, only display private commands.
|
||||
* Fixed cmd_add syntax. Correct format: name, level, short help,
|
||||
full help, callback.
|
||||
* Added core command HELP.
|
||||
|
||||
+10
-1
@@ -255,7 +255,16 @@ sub cmd_help
|
||||
# No command specified. List commands.
|
||||
my $cmdlist = '';
|
||||
foreach (sort keys %API::Std::CMDS) {
|
||||
$cmdlist .= ", \002".uc($_)."\002";
|
||||
if (defined $data{chan}) {
|
||||
if ($API::Std::CMDS{$_}{lvl} == 0 or $API::Std::CMDS{$_}{lvl} == 2) {
|
||||
$cmdlist .= ", \002".uc($_)."\002";
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($API::Std::CMDS{$_}{lvl} == 1 or $API::Std::CMDS{$_}{lvl} == 2) {
|
||||
$cmdlist .= ", \002".uc($_)."\002";
|
||||
}
|
||||
}
|
||||
}
|
||||
$cmdlist = substr($cmdlist, 2);
|
||||
|
||||
|
||||
Reference in new issue
Block a user