From 6060057741b81788fc989b1021eb1f66b2447ffe Mon Sep 17 00:00:00 2001 From: timriker Date: Wed, 20 Nov 2002 18:37:39 +0000 Subject: [PATCH] show modified by in factinfo git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@632 c11ca15a-4712-0410-83d8-924469b57eb5 --- src/Modules/Factoids.pl | 44 ++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/Modules/Factoids.pl b/src/Modules/Factoids.pl index f00bdaa..45f8554 100644 --- a/src/Modules/Factoids.pl +++ b/src/Modules/Factoids.pl @@ -60,28 +60,28 @@ sub CmdFactInfo { } # modified: -# if ($factinfo{'modified_by'}) { -# $string = "last modified"; -# -# my $time = $factinfo{'modified_time'}; -# if ($time) { -# if (time() - $time > 60*60*24*7) { -# $string .= " at \037". scalar(localtime $time). "\037"; -# } else { -# $string .= " ".&Time2String(time() - $time)." ago"; -# } -# } -# -# my @x; -# foreach (split ",", $factinfo{'modified_by'}) { -# /\!/; -# push(@x, $`); -# } -# $string .= "by ".&IJoin(@x); -# -# $i++; -# push(@array,$string); -# } + if ($factinfo{'modified_by'}) { + $string = "last modified"; + + my $time = $factinfo{'modified_time'}; + if ($time) { + if (time() - $time > 60*60*24*7) { + $string .= " at \037". scalar(localtime $time). "\037"; + } else { + $string .= " ".&Time2String(time() - $time)." ago "; + } + } + + my @x; + foreach (split ",", $factinfo{'modified_by'}) { + /\!/; + push(@x, $`); + } + $string .= "by ".&IJoin(@x); + + $i++; + push(@array,$string); + } # requested: if ($factinfo{'requested_by'}) { -- 2.39.2