3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-26 22:09:26 +01:00

Add HHGTTG easter egg to math.pl

This commit is contained in:
Pragmatic Software 2014-08-13 16:55:04 +00:00
parent 654cce66a5
commit 749fda0ff3
2 changed files with 7 additions and 3 deletions

View File

@ -13,8 +13,8 @@ use warnings;
# These are set automatically by the build/commit script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 776,
BUILD_DATE => "2014-08-11",
BUILD_REVISION => 777,
BUILD_DATE => "2014-08-13",
};
1;

View File

@ -17,6 +17,10 @@ if ($#ARGV < 0)
}
$arguments = join(' ', @ARGV);
my $orig_arguments = $arguments;
$arguments =~ s/answer.*question of life(,? the universe and everything)?\s?/42/gi;
$arguments =~ s/meaning of (life|existence|everything)?/42/gi;
if($arguments =~ m/([\$`\|{}"'#@=])/) {
$invalid = $1;
@ -45,4 +49,4 @@ if($@) {
exit 1;
}
print "$arguments = $response\n";
print "$orig_arguments = $response\n";