$response = $responses[ int( rand( scalar( @responses ) ) ) ].$author;
} elsif( $response =~ /<alias>(.+)/ ) {
$response =~ s/<alias>//;
- $kernel->post( "core", "cmd", $who, "~+".$response, $src, $dest->{ 'dest' }, $replypath );
+ $kernel->post( "core", "cmd", $who, "~+".$response, $src, $dest->{ 'dest' }, $replypath, $dest->{ 'trusted' } );
return;
} else {
my @responses = split( /\|/, $response );
!exists $heap->{ 'identified' }->{ $src.uc( $who ) } &&
$cmd !~ /identify|register|title/i ) {
$kernel->post( $src,
- $replypath,
+ "send_private",
"$who: Destult is operating in high security mode; all use must be from identified users. Please REGISTER and then IDENTIFY.",
- { dest=>$dest, src=>$who, no_throttle=>$no_throttle }
+ { dest=>$who, src=>$who, no_throttle=>$no_throttle, trusted => $trusted }
);
return;
}
$kernel->post( $src,
$replypath,
"$who: Use of access-controled commands is not allowed from untrusted sources.",
- { dest=>$dest, src=>$who, no_throttle=>$no_throttle }
+ { dest=>$dest, src=>$who, no_throttle=>$no_throttle, trusted => $trusted }
);
return;
}
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 );
+ &{ $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 } );
+ $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 } );
}
} elsif( exists( $heap->{ 'db' }->{ uc( $what ) } ) && !$noparse ) {
- &{ $heap->{ 'commands' }->{ 'PARSE' } }( $kernel, $heap, $who, $what, $src, { dest => $dest, src=>$who, no_throttle => $no_throttle }, $replypath );
+ &{ $heap->{ 'commands' }->{ 'PARSE' } }( $kernel, $heap, $who, $what, $src, { dest => $dest, src=>$who, no_throttle => $no_throttle, trusted => $trusted }, $replypath );
} else {
- $kernel->post( $src, "send_private", "Huh?", { dest => $who, src => $who } );
+ $kernel->post( $src, "send_private", "Huh?", { dest => $who, src => $who, trusted => $trusted } );
}
}