summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlookshe <mail@lookshe.org>2011-10-10 16:20:24 +0200
committerlookshe <mail@lookshe.org>2011-10-10 16:20:24 +0200
commitcd391d6609866557622b19260c1e7beddb4311a7 (patch)
tree09db0a4354436d232d7c4894762a3ba14e37e6ee
parent37641bf56c350393ed49010b5ec4a35e791f51ff (diff)
bugfix for finding join of user and output time of join
-rw-r--r--firstseen.pl4
1 files 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 (<file>) {
- if ($line =~ m/^\[[0-9]{2}:[0-9]{2}(:[0-]{2})?\] (Action: )?<?$nick>? /i) {
+ if ($line =~ m/^\[[0-9]{2}:[0-9]{2}(:[0-9]{2})?\] (Action: )?<?$nick>? /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;
}