if( exists( $heap->{ 'users' }->{ uc( $whom ) } ) ) {
if( $heap->{ 'users' }->{ uc( $whom ) } eq md5_hex( $password ) ) {
- $heap->{ 'identified' }->{ $src.uc( $who ) } = 1;
+ $heap->{ 'identified' }->{ $src.uc( $who ) } = uc( $whom );
$kernel->post( $src, $replypath, "Hello, $who.", $dest );
} else {
$kernel->post( $src, $replypath, "Authentication failed.", $dest );
if( exists( $heap->{ 'factoidAccess' }->{ uc( $factoid ) } ) &&
( !exists( $heap->{ 'identified' }->{ $src.uc( $who ) } ) ||
- accessLevel( $kernel, $heap, uc( $who ), $src ) < $heap->{ 'factoidAccess' }->{ uc( $factoid ) } ) ) {
+ accessLevel( $kernel, $heap, $heap->{ 'identified' }->{ $src.uc( $who ) }, $src ) < $heap->{ 'factoidAccess' }->{ uc( $factoid ) } ) ) {
$kernel->post( $src, $replypath, "$who: An access level of ".$heap->{ 'factoidAccess' }->{ uc( $factoid ) }." is required for the factoid '$factoid'", $dest );
return;
}
if( exists( $heap->{ 'memo' } ) &&
exists( $heap->{ 'memo' }->{ uc( $who ) } ) ) {
if( exists( $heap->{ 'identified' }->{ $src.uc( $who ) } ) ) {
- $kernel->yield( "cmd", $who, "CHECKMEMO", $src, $who, "send_private", $trusted );
+ $kernel->yield( "cmd", $who, "CHECKMEMO", $src, $heap->{ 'identified' }->{ $src.uc( $who ) }, "send_private", $trusted );
} else {
$kernel->yield( "cmd", $who, "COUNTMEMO", $src, $who, "send_private", $trusted );
}
}
if( !exists $heap->{ 'cmdaccess' }->{ uc( $cmd ) } || (
exists $heap->{ 'identified' }->{ $src.uc( $who ) } &&
- accessLevel( $kernel, $heap, uc( $who ), $src ) >= $heap->{ 'cmdaccess' }->{ uc( $cmd ) } ) ) {
+ accessLevel( $kernel, $heap, $heap->{ 'identified' }->{ $src.uc( $who ) }, $src ) >= $heap->{ 'cmdaccess' }->{ uc( $cmd ) } ) ) {
&{ $heap->{ 'commands' }->{ uc( $cmd ) } }( $kernel, $heap, $who, $subj, $src, { dest => $dest, src=>$who, no_throttle => $no_throttle, trusted => $trusted }, $replypath );
} else {
$kernel->post( $src, $replypath, "$who: An access level of ".$heap->{ 'cmdaccess' }->{ uc( $cmd ) }." is required for '$cmd'", { dest=>$dest, src=>$who, no_throttle=>$no_throttle, trusted => $trusted } );