From d40361a2bf99d76fd711ebadb357e76cd3fda9ec Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sun, 31 Aug 2014 20:27:40 +0000 Subject: [PATCH] Disallow ?, [, ], and ~~ in math.pl --- PBot/VERSION.pm | 2 +- modules/math.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index d3addf79..23690951 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -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", }; diff --git a/modules/math.pl b/modules/math.pl index dfb3ad47..80276ff6 100755 --- a/modules/math.pl +++ b/modules/math.pl @@ -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) {