3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-24 03:33:06 +01:00

Require curly braces or backticks around embedded commands

This commit is contained in:
Pragmatic Software 2015-10-10 06:07:24 -07:00
parent 8bb7dfece6
commit 43418c1bc6

View File

@ -112,7 +112,7 @@ sub process_line {
} elsif($cmd_text =~ s/^(.*?),?\s*$botnick[?!.]*$//i) {
$command = $1;
$processed += 100;
} elsif ($cmd_text =~ s/\B$bot_trigger([^ ]+)//) {
} elsif ($cmd_text =~ s/\B$bot_trigger`([^`]+)// || $cmd_text =~ s/\B$bot_trigger\{([^}]+)//) {
my $cmd = $1;
$cmd =~ s/(.)[.!?;,)]$/$1/;
my ($nick) = $cmd_text =~ m/^([^ ,:;]+)/;