From: pdbogen Date: Tue, 21 Apr 2009 14:00:54 +0000 (+0000) Subject: Block access to level-0 commands by unidentified users. X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=f05ae4ae1457851261f82a4d2e383f15c4a1e992;p=destult.git Block access to level-0 commands by unidentified users. git-svn-id: https://www.cernu.us/~pdbogen/svn/destult2@91 088b83a4-0077-4247-935c-42ec02c2848b --- diff --git a/core.pl b/core.pl index 2802e9b..8923ba9 100644 --- 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 );