3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-24 03:33:06 +01:00

Ensure params to track_mode are defined

This commit is contained in:
Pragmatic Software 2020-06-11 19:30:07 -07:00
parent 71ae499dfa
commit 9ec2622183
2 changed files with 4 additions and 4 deletions

View File

@ -277,8 +277,8 @@ sub track_mode {
my ($source, $channel, $mode, $mask) = @_; my ($source, $channel, $mode, $mask) = @_;
my ($nick) = $source =~ /(^[^!]+)/; my ($nick) = $source =~ /(^[^!]+)/;
$channel = lc $channel; $channel = defined $channel ? lc $channel : '';
$mask = lc $mask; $mask = defined $mask ? lc $mask : '';
my $mute_char = $self->{pbot}->{registry}->get_value('banlist', 'mute_mode_char'); my $mute_char = $self->{pbot}->{registry}->get_value('banlist', 'mute_mode_char');

View File

@ -35,8 +35,8 @@ sub initialize {
sub track_mode { sub track_mode {
my ($self, $source, $channel, $mode, $target) = @_; my ($self, $source, $channel, $mode, $target) = @_;
$channel = lc $channel; $channel = defined $channel ? lc $channel : '';
$target = lc $target; $target = defined $target ? lc $target : '';
if ($target eq lc $self->{pbot}->{registry}->get_value('irc', 'botnick')) { if ($target eq lc $self->{pbot}->{registry}->get_value('irc', 'botnick')) {
if ($mode eq '+o') { if ($mode eq '+o') {