Block access to level-0 commands by unidentified users.
authorpdbogen <pdbogen@088b83a4-0077-4247-935c-42ec02c2848b>
Tue, 21 Apr 2009 14:00:54 +0000 (14:00 +0000)
committerpdbogen <pdbogen@088b83a4-0077-4247-935c-42ec02c2848b>
Tue, 21 Apr 2009 14:00:54 +0000 (14:00 +0000)
git-svn-id: https://www.cernu.us/~pdbogen/svn/destult2@91 088b83a4-0077-4247-935c-42ec02c2848b

core.pl

diff --git a/core.pl b/core.pl
index 2802e9b..8923ba9 100644 (file)
--- a/core.pl
+++ b/core.pl
@@ -152,8 +152,7 @@ sub cmd {
        }
 
        if( exists( $heap->{ 'commands' }->{ uc( $cmd ) } ) ) {
-               if( !exists $heap->{ 'cmdaccess' }->{ uc( $cmd ) } || 
-                       $heap->{ 'cmdaccess' }->{ uc( $cmd ) } == 0 || (
+               if( !exists $heap->{ 'cmdaccess' }->{ uc( $cmd ) } || (
                        exists $heap->{ 'identified' }->{ $src.uc( $who ) } &&
                        accessLevel( $kernel, $heap, uc( $who ), $src ) >= $heap->{ 'cmdaccess' }->{ uc( $cmd ) } ) ) {
                        &{ $heap->{ 'commands' }->{ uc( $cmd ) } }( $kernel, $heap, $who, $subj, $src, { dest => $dest, src=>$who, no_throttle => $no_throttle }, $replypath );