1
0
Fork 0
mirror of https://github.com/perlbot/perlbuut synced 2025-06-07 10:55:40 -04:00

changing it to ignore \s and - as command callers

This commit is contained in:
Ryan Voots 2011-02-03 09:59:43 -05:00
parent fc3d267c92
commit a570ad9486

View file

@ -360,7 +360,7 @@ sub _parse_for_commands {
my $command_re = join '|', map "\Q$_", keys %$commands;
$command_re = qr/$command_re/; #TODO move to _pre_build_chains and switch to Trie
if( $said->{body} =~ s/^\s*($command_re)[ \t:,;.-]\s*(.+)/$2/
if( $said->{body} =~ s/^\s*($command_re)[:,;]\s*(.+)/$2/
or $said->{body} =~ s/^\s*($command_re)\s*$// ) {
my $found_command = $1;