diff options
-rw-r--r-- | data/tpl/defs.pl | 4 | ||||
-rw-r--r-- | lib/Multi/IRC.pm | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/data/tpl/defs.pl b/data/tpl/defs.pl index 47364193..039c6507 100644 --- a/data/tpl/defs.pl +++ b/data/tpl/defs.pl @@ -168,8 +168,8 @@ sub summary { # cmd, len, def if(!$as && s/(http|https):\/\/(.+[0-9a-zA-Z=\/])/<a href="$1:\/\/$2" rel="nofollow">link<\/a>/) { $l = 4; } elsif(!$as) { - s/^(.*[^\w]|)([tdvpr][0-9]+)\.([0-9]+)([^\w].*|)$/$1<a href="\/$2.$3">$2.$3<\/a>$4/ || - s/^(.*[^\w]|)([tduvpr][0-9]+)([^\w].*|)$/$1<a href="\/$2">$2<\/a>$3/; + s/^(.*[^\w]|)([tdvpr][1-9][0-9]*)\.([1-9][0-9]*)([^\w].*|)$/$1<a href="\/$2.$3">$2.$3<\/a>$4/ || + s/^(.*[^\w]|)([tduvpr][1-9][0-9]*)([^\w].*|)$/$1<a href="\/$2">$2<\/a>$3/; } while(s/\[\/url\]/<\/a>/i) { $l -= 6; diff --git a/lib/Multi/IRC.pm b/lib/Multi/IRC.pm index 708f4b06..e0a8b010 100644 --- a/lib/Multi/IRC.pm +++ b/lib/Multi/IRC.pm @@ -164,8 +164,8 @@ sub vndbid { # dest, msg my @id; # [ type, id, ref ] for (split /[, ]/, $m) { next if length > 15 or m{[a-z]{3,6}://}i; # weed out URLs and too long things - push @id, /^(?:.*[^\w]|)([dvprt])([0-9]+)\.([0-9]+)(?:[^\w].*|)$/ ? [ $1, $2, $3 ] # matches 2, 4 and 5 - : /^(?:.*[^\w]|)([dvprtu])([0-9]+)(?:[^\w].*|)$/ ? [ $1, $2, 0 ] : (); # matches 1 and 3 + push @id, /^(?:.*[^\w]|)([dvprt])([1-9][0-9]*)\.([1-9][0-9]*)(?:[^\w].*|)$/ ? [ $1, $2, $3 ] # matches 2, 4 and 5 + : /^(?:.*[^\w]|)([dvprtu])([1-9][0-9]*)(?:[^\w].*|)$/ ? [ $1, $2, 0 ] : (); # matches 1 and 3 } # loop through the matched IDs and search the database |