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

Interpreter: no need to use regex here

This commit is contained in:
Pragmatic Software 2020-02-05 01:13:46 -08:00
parent 0a278a743c
commit 6ff93c0190

View File

@ -302,7 +302,7 @@ sub interpret {
};
$self->add_message_to_output_queue($stuff->{from}, $message, $delay);
$delay = duration($delay);
$self->{pbot}->{logger}->log("($delay delay) [$message->{message}]\n");
$self->{pbot}->{logger}->log("($delay delay) $message->{message}\n");
return undef;
}
}
@ -887,7 +887,7 @@ sub handle_result {
};
$self->add_message_to_output_queue($stuff->{from}, $message, 0);
} else {
$self->{pbot}->{conn}->privmsg($stuff->{from}, "And that's all I have to say about that. See $link for full text.") unless $stuff->{from} =~ /stdin\@pbot$/;
$self->{pbot}->{conn}->privmsg($stuff->{from}, "And that's all I have to say about that. See $link for full text.") unless $stuff->{from} eq 'stdin@pbot';
}
last;
}
@ -931,7 +931,7 @@ sub output_result {
my $line = $stuff->{line};
return if not defined $line or not length $line;
return 0 if $stuff->{from} =~ /stdin\@pbot$/;
return 0 if $stuff->{from} eq 'stdin\@pbot';
if ($line =~ s/^\/say\s+//i) {
if (defined $stuff->{nickoverride} and ($stuff->{no_nickoverride} == 0 or $stuff->{force_nickoverride} == 1)) {