$msg =~ s/(\x3)[0-9]{0,2}//g;
$msg =~ s/\x02//g;
$cmd = ( split( / /, $msg, 2 ) )[0];
- if( $bridged ) {
- $kernel->post( "core", "seen", $who, $msg, $self->{ "ssid" }, $dest->[0], "send_public_to" );
- } else {
- $kernel->post( "core", "seen", $who, $msg, $self->{ "ssid" }, $who, "send_private" );
- }
- if( $cmd =~ /^[~].*/ ) {
- $kernel->post( "core", "cmd", $who, $msg, $self->{ "ssid" }, $dest->[0], "send_public_to" );
- } else {
- if( $msg =~ m!(https?://[^[:space:]]+)!i && $self->{ "trapEnabled" } == 1 && length($1) >= 30 ) {
- print( "IRC : URL Trapped: '$1' from $who\n" );
- my $url = $1;
- if( $self->{ "trap" } ) {
- $kernel->post( "core", "cmd", $who, "SHORTEN ".$self->{ "trap" }." $url", $self->{ "ssid" }, $dest->[0], "send_public_to" );
- } else {
- $kernel->post( "core", "cmd", $who, "SHORTEN $url", $self->{ "ssid" }, $dest->[0], "send_public_to" );
- }
- }
- if( $msg =~ m/^([^ ]+)--$/ ) {
- $kernel->post( "core", "cmd", $who, "KARMADOWN $1", $self->{ "ssid"}, $dest->[0], "send_public_to" );
- } elsif( $msg =~ m/^([^ ]+)\+\+$/ && $msg !~ m/DC\+\+$/i ) {
- $kernel->post( "core", "cmd", $who, "KARMAUP $1", $self->{ "ssid"}, $dest->[0], "send_public_to" );
- }
- }
+ $kernel->post( "core", "core_public", $who, $msg, $self->{ "ssid" }, $dest->[0], "send_public_to" );
}
sub on_private {