mirror of
https://github.com/pragma-/pbot.git
synced 2025-02-16 21:40:46 +01:00
Plugin/UrlTitles: improve logic of show_url_titles
This commit is contained in:
parent
ca7670da3d
commit
26a2b36122
@ -271,11 +271,11 @@ sub show_url_titles($self, $event_type, $event) {
|
|||||||
$event->{args}[0]
|
$event->{args}[0]
|
||||||
);
|
);
|
||||||
|
|
||||||
# get show_url_titles for channel or true if not defined
|
# get show_url_titles for channel
|
||||||
my $enabled = $self->{pbot}->{registry}->get_value($channel, 'show_url_titles') // 1;
|
my $enabled = $self->{pbot}->{registry}->get_value($channel, 'show_url_titles');
|
||||||
|
|
||||||
# disabled in channel
|
# 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');
|
return 0 if $self->{pbot}->{registry}->get_value($channel, 'no_url_titles');
|
||||||
|
|
||||||
# disabled globally (unless allowed by channel)
|
# disabled globally (unless allowed by channel)
|
||||||
|
@ -25,8 +25,8 @@ use PBot::Imports;
|
|||||||
# These are set by the /misc/update_version script
|
# These are set by the /misc/update_version script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 4711,
|
BUILD_REVISION => 4714,
|
||||||
BUILD_DATE => "2024-03-07",
|
BUILD_DATE => "2024-03-09",
|
||||||
};
|
};
|
||||||
|
|
||||||
sub initialize {}
|
sub initialize {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user