mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-05 19:49:32 +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]
|
||||
);
|
||||
|
||||
# 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)
|
||||
|
@ -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 {}
|
||||
|
Loading…
Reference in New Issue
Block a user