From dcacec18c6f607e65d72e43dc32e8d8f42d5f840 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sat, 25 Jun 2016 18:09:47 -0700 Subject: [PATCH] Totally not a bug Extremely minor rearrangement of interpreter logic so that `!commands` are parsed before `command, botnick`. Totally not a bug at all. Pay no attention. --- PBot/Interpreter.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PBot/Interpreter.pm b/PBot/Interpreter.pm index 10331424..8f8151ba 100644 --- a/PBot/Interpreter.pm +++ b/PBot/Interpreter.pm @@ -113,15 +113,15 @@ sub process_line { $has_code = $2 if length $2 and $nick_override !~ /^(?:enum|struct|union)$/; $preserve_whitespace = 1; $processed += 100; + } elsif($cmd_text =~ s/^$bot_trigger(.*)$//) { + $command = $1; + $processed += 100; } elsif($cmd_text =~ s/^.?$botnick.?\s*(.*?)$//i) { $command = $1; $processed += 100; } elsif($cmd_text =~ s/^(.*?),?\s*$botnick[?!.]*$//i) { $command = $1; $processed += 100; - } elsif($cmd_text =~ s/^$bot_trigger(.*)$//) { - $command = $1; - $processed += 100; } last if not defined $command and not defined $has_code;