mirror of
https://github.com/pragma-/pbot.git
synced 2025-02-02 15:34:05 +01:00
math.pl: add cbrt and add optional "the" to 42 question
This commit is contained in:
parent
573a18e6ef
commit
938561a2fb
@ -7,7 +7,7 @@ my ($arguments, $response, $invalid);
|
||||
my @valid_keywords = (
|
||||
'sin', 'cos', 'tan', 'atan', 'exp', 'int', 'hex', 'oct', 'log', 'sqrt',
|
||||
'floor', 'ceil', 'asin', 'acos', 'log10', 'sinh', 'cosh', 'tanh', 'abs',
|
||||
'pi', 'deg2rad', 'rad2deg', 'atan2'
|
||||
'pi', 'deg2rad', 'rad2deg', 'atan2', 'cbrt'
|
||||
);
|
||||
|
||||
if ($#ARGV < 0)
|
||||
@ -19,7 +19,7 @@ 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/(the )*answer.*question of life(,? the universe and everything)?\s?/42/gi;
|
||||
$arguments =~ s/meaning of (life|existence|everything)?/42/gi;
|
||||
|
||||
if($arguments =~ m/([\$`\|{}"'#@=?\[\]])/ or $arguments =~ m/(~~)/) {
|
||||
|
Loading…
Reference in New Issue
Block a user