if( exists( $heap->{ 'commands' }->{ uc( $cmd ) } ) ) {
if( ( $Destult::config{ 'SECURITY' } =~ /high/i ||
exists $heap->{ 'cmdaccess' }->{ uc( $cmd ) } ) && !$trusted ) {
+ print( "CORE: Rejecting access-controlled command attempt from $who (untrusted source)\n" );
$kernel->post( $src,
$replypath,
"$who: Use of access-controled commands is not allowed from untrusted sources.",
}
sub unidentify {
- my( $kernel, $heap, $whom ) = @_[ KERNEL, HEAP, ARG0 ];
- if( exists( $heap->{ 'identified' }->{ $whom } ) ) {
- delete $heap->{ 'identified' }->{ $whom };
+ my( $kernel, $heap, $whom, $src ) = @_[ KERNEL, HEAP, ARG0, ARG1 ];
+ if( exists( $heap->{ 'identified' } ) && exists( $heap->{ 'identified' }->{ $src.uc( $whom ) } ) ) {
+ delete $heap->{ 'identified' }->{ $src.uc( $whom ) };
}
}
$msg =~ s/(\x3)[0-9]{0,2}//g;
$msg =~ s/\x02//g;
$cmd = ( split( / /, $msg, 2 ) )[0];
- print( "$bridged -> ".($bridged==0)."\n" );
$kernel->post( "core", "core_public", $who, $msg, $self->{ "ssid" }, $dest->[0], "send_public_to", ($bridged==0) );
}
sub on_kick {
my( $kernel, $heap, $whom ) = @_[ KERNEL, HEAP, ARG2 ];
- $kernel->post( "core", "unidentify", uc( $whom ) );
+ my $self = $_[HEAP]->{ "self" };
+ print( "IRC: $whom kicked\n" );
+ $kernel->post( "core", "unidentify", uc( $whom ), $self->{ "ssid" } );
}
+
sub on_nick {
my( $kernel, $heap, $whom ) = @_[ KERNEL, HEAP, ARG0 ];
+ my $self = $_[HEAP]->{ "self" };
$whom = ( split( /!/, $whom, 2 ) )[0];
- $kernel->post( "core", "unidentify", uc( $whom ) );
+ print( "IRC: $whom changed nick\n" );
+ $kernel->post( "core", "unidentify", uc( $whom ), $self->{ "ssid" } );
}
+
sub on_part {
my( $kernel, $heap, $whom ) = @_[ KERNEL, HEAP, ARG0 ];
+ my $self = $_[HEAP]->{ "self" };
$whom = ( split( /!/, $whom, 2 ) )[0];
- $kernel->post( "core", "unidentify", uc( $whom ) );
+ print( "IRC: $whom parted\n" );
+ $kernel->post( "core", "unidentify", uc( $whom ), $self->{ "ssid" } );
}
+
sub on_quit {
my( $kernel, $heap, $whom ) = @_[ KERNEL, HEAP, ARG0 ];
+ my $self = $_[HEAP]->{ "self" };
$whom = ( split( /!/, $whom, 2 ) )[0];
- $kernel->post( "core", "unidentify", uc( $whom ) );
+ print( "IRC: $whom quit\n" );
+ $kernel->post( "core", "unidentify", uc( $whom ), $self->{ "ssid" } );
}
sub do_mode {