From dae3d7be8b8018f34e64c2cccb5e4e2f4d363220 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sat, 23 Nov 2002 16:40:45 +0000 Subject: Updated from scripts.irssi.org git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3025 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- scripts/scriptassist.pl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/scriptassist.pl b/scripts/scriptassist.pl index 6a2f791e..ad72f9a9 100644 --- a/scripts/scriptassist.pl +++ b/scripts/scriptassist.pl @@ -6,7 +6,7 @@ use strict; use vars qw($VERSION %IRSSI); -$VERSION = '2002112201'; +$VERSION = '2002112301'; %IRSSI = ( authors => 'Stefan \'tommie\' Tomanek', contact => 'stefan@pico.ruhr.de', @@ -814,11 +814,12 @@ sub compare_versions ($$) { my ($ver1, $ver2) = @_; my @ver1 = split /\./, $ver1; my @ver2 = split /\./, $ver2; - if (scalar(@ver2) != scalar(@ver1)) { - return 0; - } + #if (scalar(@ver2) != scalar(@ver1)) { + # return 0; + #} my $cmp = 0; - $cmp ||= $ver1[$_] <=> $ver2[$_] for 0..scalar(@ver2); + ### Special thanks to Clemens Heidinger + $cmp ||= $ver1[$_] <=> $ver2[$_] || $ver1[$_] cmp $ver2[$_] for 0..scalar(@ver2); return 'newer' if $cmp == 1; return 'older' if $cmp == -1; return 'equal'; -- cgit v1.2.3