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:
parent
654cce66a5
commit
749fda0ff3
@ -13,8 +13,8 @@ use warnings;
|
|||||||
# These are set automatically by the build/commit script
|
# These are set automatically by the build/commit script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 776,
|
BUILD_REVISION => 777,
|
||||||
BUILD_DATE => "2014-08-11",
|
BUILD_DATE => "2014-08-13",
|
||||||
};
|
};
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@ -17,6 +17,10 @@ if ($#ARGV < 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$arguments = join(' ', @ARGV);
|
$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/([\$`\|{}"'#@=])/) {
|
if($arguments =~ m/([\$`\|{}"'#@=])/) {
|
||||||
$invalid = $1;
|
$invalid = $1;
|
||||||
@ -45,4 +49,4 @@ if($@) {
|
|||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
print "$arguments = $response\n";
|
print "$orig_arguments = $response\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user