3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-01 17:16:39 +02:00

Interpreter: when result is "/say" output a space

This commit is contained in:
Pragmatic Software 2020-06-20 21:38:12 -07:00
parent bbbfcbb25a
commit 236c101e3e

View File

@ -967,7 +967,8 @@ sub output_result {
$line = $self->dehighlight_nicks($line, $context->{from}) if $context->{from} =~ /^#/ and $line !~ /^\/msg\s+/i;
if ($line =~ s/^\/say\s+//i) {
if ($line =~ s/^\/say(?:\s+|$)//i) {
$line = ' ' if not length $line;
if (defined $context->{nickoverride} and ($context->{no_nickoverride} == 0 or $context->{force_nickoverride} == 1)) { $line = "$context->{nickoverride}: $line"; }
$pbot->{conn}->privmsg($context->{from}, $line) if defined $context->{from} && $context->{from} ne $botnick;
$pbot->{antiflood}->check_flood($context->{from}, $botnick, $pbot->{registry}->get_value('irc', 'username'), 'pbot', $line, 0, 0, 0) if $context->{checkflood};