Fixed an issue in HELP.

This commit is contained in:
Elijah Perrault committed 2011-04-14 19:26:48 -06:00
1 parent 2ca0885741
commit 72006a8e7e
2 files changed
+8 -2

No files matched your search

+1
View File
@@ -3,6 +3,7 @@ Auto IRC Bot 3.0: Change Log
3.0 Indev 3.0 Indev
=============================================================================== ===============================================================================
* Fixed an issue in HELP.
* Added a Ping module. * Added a Ping module.
* Moved Werewolf back to stable. * Moved Werewolf back to stable.
+7 -2
View File
@@ -265,9 +265,9 @@ sub cmd_help
# Help for a specific command was requested. Lets get it. # Help for a specific command was requested. Lets get it.
my $rcm = uc($argv[0]); my $rcm = uc($argv[0]);
if (exists $API::Std::CMDS{$rcm}{help}) {
# If there is help for this command. # If there is help for this command.
if (exists $API::Std::CMDS{$rcm}) {
if (exists $API::Std::CMDS{$rcm}{help}) {
# Check for necessary privileges. # Check for necessary privileges.
if ($API::Std::CMDS{$rcm}{priv}) { if ($API::Std::CMDS{$rcm}{priv}) {
if (!has_priv(match_user(%$src), $API::Std::CMDS{$rcm}{priv})) { if (!has_priv(match_user(%$src), $API::Std::CMDS{$rcm}{priv})) {
@@ -308,6 +308,11 @@ sub cmd_help
notice($src->{svr}, $src->{nick}, "No help for \002".$rcm."\002 available."); notice($src->{svr}, $src->{nick}, "No help for \002".$rcm."\002 available.");
} }
} }
else {
# If there is no help, don't give any.
notice($src->{svr}, $src->{nick}, "No help for \002".$rcm."\002 available.");
}
}
return 1; return 1;
} }