]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Modules/Factoids.pl
show modified by in factinfo
[infobot.git] / src / Modules / Factoids.pl
index caadae6856a1c36fef09cc893623bed989782a8e..45f85548a9286f07cac6e56a87029dd172dfa9be 100644 (file)
@@ -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'}) {
@@ -271,7 +271,7 @@ sub CmdFactStats {
        for (@list) {
            my $factoid = $_;
            my $val = &getFactInfo($factoid, "factoid_value");
-           if ($val =~ /^<REPLY> see( also)? (.*?)\.?$/i) {
+           if ($val =~ /^<REPLY> ?see( also)? (.*?)\.?$/i) {
                my $redirf = lc $2;
                my $redir = &getFactInfo($redirf, "factoid_value");
                next if (defined $redir);