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

Disallow ?, [, ], and ~~ in math.pl

This commit is contained in:
Pragmatic Software 2014-08-31 20:27:40 +00:00
parent fa2e3e4b5d
commit d40361a2bf
2 changed files with 2 additions and 2 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 => 782,
BUILD_REVISION => 783,
BUILD_DATE => "2014-08-31",
};

View File

@ -22,7 +22,7 @@ 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/([\$`\|{}"'#@=?\[\]])/ or $arguments =~ m/(~~)/) {
$invalid = $1;
} else {
while($arguments =~ /([a-zA-Z0-9]+)/g) {