diff --git a/Irpg/Main.pm b/Irpg/Main.pm index 1454e74ba45f225b39fba4ef1e027b019f9121c4..a63daa211b3dd79a32d8ab8b5a6cd6aee345bc1a 100644 --- a/Irpg/Main.pm +++ b/Irpg/Main.pm @@ -515,7 +515,7 @@ sub parse { $usernick); } } else { - Irpg::Irc::privmsg("You don't have access to ".uc($arg[3]).".", $usernick); + Irpg::Irc::notice("You don't have access to ".uc($arg[3]).".", $usernick); } } else { # the message is not a command @@ -528,9 +528,12 @@ sub help { my ($userhost, $usernick, $username, $source, @arg) = @_; my $ctxt = $source =~ m/^#/ ? 'pub' : 'prv'; my $ret = ''; + my $isadmin = $rps->{username}{isadmin}; if (!exists($arg[0])) { $ret = "Available commands : ". - join(', ', grep({ $commands{$_}->{$ctxt} } keys(%commands))). + join(', ', grep({ $commands{$_}->{$ctxt} + && $commands{$_}->{adm} <= $isadmin + } keys(%commands))). ". Do $opts->{token}help <cmds> for help on a specific command. ". "For information on the game, see $opts->{helpurl}. "; }