mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-27 13:12:42 +01:00
Add HHGTTG easter egg to math.pl
This commit is contained in:
parent
654cce66a5
commit
749fda0ff3
@ -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;
|
||||
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user