3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-19 10:29:30 +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 ($nick) = $source =~ /(^[^!]+)/;
$channel = lc $channel;
$mask = lc $mask;
$channel = defined $channel ? lc $channel : '';
$mask = defined $mask ? lc $mask : '';
my $mute_char = $self->{pbot}->{registry}->get_value('banlist', 'mute_mode_char');

View File

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