summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-07-13 12:45:54 +0000
committeryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-07-13 12:45:54 +0000
commit94e9da6f6c654f45bc7efb7a4e6591c64f0553c5 (patch)
tree224c2739c6ae20cc72714139be5cd6f81745bb41 /lib
parent892f6a866c149b3460d8c45a03706659d269129b (diff)
Zero-padded VNDBIDs shouldn't match
git-svn-id: svn://vndb.org/vndb@68 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
Diffstat (limited to 'lib')
-rw-r--r--lib/Multi/IRC.pm4
1 files changed, 2 insertions, 2 deletions
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