Plugin/UrlTitles: improve logic of `show_url_titles`

This commit is contained in:
Pragmatic Software 2024-03-09 19:37:17 -08:00
parent ca7670da3d
commit 26a2b36122
No known key found for this signature in database
GPG Key ID: CC916B6E3C84ECCE
2 changed files with 5 additions and 5 deletions

View File

@ -271,11 +271,11 @@ sub show_url_titles($self, $event_type, $event) {
$event->{args}[0]
);
# get show_url_titles for channel or true if not defined
my $enabled = $self->{pbot}->{registry}->get_value($channel, 'show_url_titles') // 1;
# get show_url_titles for channel
my $enabled = $self->{pbot}->{registry}->get_value($channel, 'show_url_titles');
# disabled in channel
return 0 if !$enabled;
return 0 if defined $enabled && !$enabled;
return 0 if $self->{pbot}->{registry}->get_value($channel, 'no_url_titles');
# disabled globally (unless allowed by channel)

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 => 4711,
BUILD_DATE => "2024-03-07",
BUILD_REVISION => 4714,
BUILD_DATE => "2024-03-09",
};
sub initialize {}