]> git.donarmstrong.com Git - infobot.git/commitdiff
cut the cruft
authortimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 29 May 2004 20:31:07 +0000 (20:31 +0000)
committertimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 29 May 2004 20:31:07 +0000 (20:31 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@945 c11ca15a-4712-0410-83d8-924469b57eb5

src/Modules/Kernel.pl

index 80eb38802370b2e993da024dbbca5af08fc7444f..3a978372feeaa72eb6278876337c231c6f049564 100644 (file)
@@ -12,15 +12,29 @@ sub kernelGetInfo {
 }
 
 sub Kernel {
+    my $return = "Linux kernel versions";
     my @now = &kernelGetInfo();
     if (!scalar @now) {
        &::msg($::who, "failed.");
        return;
     }
 
-    foreach (@now) {
-       &::msg($::who, $_);
+    foreach $line (@now) {
+       $line =~ s/The latest //;
+       $line =~ s/version //;
+       $line =~ s/of //;
+       $line =~ s/the //;
+       $line =~ s/Linux //;
+       $line =~ s/kernel //;
+       $line =~ s/tree //;
+       $line =~ s/ for stable//;
+       $line =~ s/ to stable kernels//;
+       $line =~ s/ for 2.4//;
+       $line =~ s/ for 2.2//;
+       $line =~ s/ is: */: /;
+       $return .= ", " . $line;
     }
+    &::msg($::who, $return);
 }
 
 sub kernelAnnounce {