mirror of
https://github.com/pragma-/pbot.git
synced 2025-04-29 19:30:45 +02:00
Disallow ?, [, ], and ~~ in math.pl
This commit is contained in:
parent
fa2e3e4b5d
commit
d40361a2bf
@ -13,7 +13,7 @@ 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 => 782,
|
BUILD_REVISION => 783,
|
||||||
BUILD_DATE => "2014-08-31",
|
BUILD_DATE => "2014-08-31",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ my $orig_arguments = $arguments;
|
|||||||
$arguments =~ s/answer.*question of life(,? the universe and everything)?\s?/42/gi;
|
$arguments =~ s/answer.*question of life(,? the universe and everything)?\s?/42/gi;
|
||||||
$arguments =~ s/meaning of (life|existence|everything)?/42/gi;
|
$arguments =~ s/meaning of (life|existence|everything)?/42/gi;
|
||||||
|
|
||||||
if($arguments =~ m/([\$`\|{}"'#@=])/) {
|
if($arguments =~ m/([\$`\|{}"'#@=?\[\]])/ or $arguments =~ m/(~~)/) {
|
||||||
$invalid = $1;
|
$invalid = $1;
|
||||||
} else {
|
} else {
|
||||||
while($arguments =~ /([a-zA-Z0-9]+)/g) {
|
while($arguments =~ /([a-zA-Z0-9]+)/g) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user