horoscope module: List valid signs of Zodaic

This commit is contained in:
Pragmatic Software 2011-01-20 00:19:58 +00:00
parent b405f8b88e
commit 9523600366
2 changed files with 9 additions and 1 deletions

View File

@ -13,7 +13,7 @@ use warnings;
# These are set automatically by the build/commit script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 235,
BUILD_REVISION => 236,
BUILD_DATE => "2011-01-19",
};

View File

@ -422,6 +422,10 @@ sub horoscope_search {
my ($line) = $content =~ m|CHANGE $term HERE -->(.+)<!-- END $term HERE|i;
$line =~ s/ +/ /g;
if($line eq "") {
return "No results found; signs of the Zodiac are Aquarius, Pisces, Aries, Taurus, Gemini, Cancer, Leo, Virgo, Libra, Scorpio, Sagittarius, Capricorn";
}
return $line;
}
@ -436,6 +440,10 @@ sub horrorscope_search {
my ($line) = $content =~ m|<tr>.*?$term.*?</td>(.*?)</tr>|i;
$line =~ s/ +/ /g;
if($line eq "") {
return "No results found; signs of the Zodiac are Aquarius, Pisces, Aries, Taurus, Gemini, Cancer, Leo, Virgo, Libra, Scorpio, Sagittarius, Capricorn";
}
return $line;
}