From: pdbogen Date: Tue, 14 Oct 2008 18:25:48 +0000 (+0000) Subject: Okay, don't karma things that contain spaces. X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=2cc1ee8e5486655572e285ac331b269c750e863e;p=destult.git Okay, don't karma things that contain spaces. git-svn-id: https://www.cernu.us/~pdbogen/svn/destult2@65 088b83a4-0077-4247-935c-42ec02c2848b --- diff --git a/irc.pl b/irc.pl index 8360146..05ee84f 100644 --- a/irc.pl +++ b/irc.pl @@ -213,9 +213,9 @@ sub on_public { $kernel->post( "core", "cmd", $who, "SHORTEN $url", $self->{ "ssid" }, $dest->[0], "send_public_to" ); } } - if( $msg =~ m/(.+)--$/ ) { + if( $msg =~ m/^([^ ]+)--$/ ) { $kernel->post( "core", "cmd", $who, "KARMADOWN $1", $self->{ "ssid"}, $dest->[0], "send_public_to" ); - } elsif( $msg =~ m/(.+)\+\+$/ && $msg !~ m/DC\+\+$/i ) { + } elsif( $msg =~ m/^([^ ]+)\+\+$/ && $msg !~ m/DC\+\+$/i ) { $kernel->post( "core", "cmd", $who, "KARMAUP $1", $self->{ "ssid"}, $dest->[0], "send_public_to" ); } }