Trap https as well
authorpdbogen <pdbogen@088b83a4-0077-4247-935c-42ec02c2848b>
Wed, 16 Jul 2008 14:12:05 +0000 (14:12 +0000)
committerpdbogen <pdbogen@088b83a4-0077-4247-935c-42ec02c2848b>
Wed, 16 Jul 2008 14:12:05 +0000 (14:12 +0000)
git-svn-id: https://www.cernu.us/~pdbogen/svn/destult2@50 088b83a4-0077-4247-935c-42ec02c2848b

irc.pl

diff --git a/irc.pl b/irc.pl
index 941e0cf..78dcef5 100644 (file)
--- a/irc.pl
+++ b/irc.pl
@@ -195,7 +195,7 @@ sub on_public {
        }
        if( $cmd =~ /^[~].*/ ) {
                $kernel->post( "core", "cmd", $who, $msg, $self->{ "ssid" }, $dest->[0], "send_public_to" );
-       } elsif( $msg =~ m!(http://[^[:space:]]+)!i && $self->{ "trap" } == 1 && length($1) >= 30 ) {
+       } elsif( $msg =~ m!(https?://[^[:space:]]+)!i && $self->{ "trap" } == 1 && length($1) >= 30 ) {
                print( "IRC : URL Trapped: '$1' from $who\n" );
                my $url = $1;
                $kernel->post( "core", "cmd", $who, "TINYURL $url", $self->{ "ssid" }, $dest->[0], "send_public_to" );