3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-17 09:29:30 +01:00

Factoids: don't add nick if add_nick defined and set to 0

This commit is contained in:
Pragmatic Software 2024-11-06 22:51:29 -08:00
parent 54ef6b14ce
commit 12ec8bb77c
No known key found for this signature in database
GPG Key ID: CC916B6E3C84ECCE
2 changed files with 6 additions and 3 deletions

View File

@ -358,10 +358,13 @@ sub handle_action($self, $context, $action) {
my $target = $self->{pbot}->{nicklist}->is_present_similar($context->{from}, $context->{arguments});
if ($target and $action !~ /\$\{?(?:nick|args)\b/) {
my $add_nick = $self->{pbot}->{factoids}->{data}->{storage}->get_data($channel, $keyword, 'add_nick');
unless (defined $add_nick && $add_nick == 0) {
$context->{nickprefix} = $target unless $context->{nickprefix_forced};
}
}
}
}
} else {
# no arguments supplied
if ($self->{pbot}->{factoids}->{data}->{storage}->exists($channel, $keyword, 'usage')) {

View File

@ -25,8 +25,8 @@ use PBot::Imports;
# These are set by the /misc/update_version script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 4839,
BUILD_DATE => "2024-11-05",
BUILD_REVISION => 4840,
BUILD_DATE => "2024-11-06",
};
sub initialize {}