From cd391d6609866557622b19260c1e7beddb4311a7 Mon Sep 17 00:00:00 2001 From: lookshe Date: Mon, 10 Oct 2011 16:20:24 +0200 Subject: bugfix for finding join of user and output time of join --- firstseen.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firstseen.pl b/firstseen.pl index 5b938f6..859ffa2 100644 --- a/firstseen.pl +++ b/firstseen.pl @@ -23,12 +23,12 @@ my $line; open(file, $file) or die("Could not open file $file"); foreach $line () { - if ($line =~ m/^\[[0-9]{2}:[0-9]{2}(:[0-]{2})?\] (Action: )?? /i) { + if ($line =~ m/^\[[0-9]{2}:[0-9]{2}(:[0-9]{2})?\] (Action: )?? /i) { if ($date =~ /^irgendwas$/) { print "$nick belongs to inventory\n"; exit 0; } else { - ($time=$line)=~s/(.*)([0-9]{2}:[0-9]{2}(:[0-9]{2})?)(.*)\n/$2/; + ($time=$line)=~s/([^:]*)([0-9]{2}:[0-9]{2})(:[0-9]{2})?(.*)\n/$2/; print "$nick was first seen on $date at $time\n"; exit 0; } -- cgit v1.2.3