Skip to content

Commit

Permalink
Merge pull request #134 from zigdon/undef-nick_channels-safety
Browse files Browse the repository at this point in the history
Try to fix parts/quits now causing Bucket to crash
  • Loading branch information
dgw authored Jan 6, 2023
2 parents 2be967c + 0b26458 commit 47698fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bucket.pl
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ sub irc_on_kick {

delete $stats{users}{$chl}{$kickee};

if ( !@{$irc->nick_channels( $kickee )} ) {
if ( !@{$irc->nick_channels( $kickee ) // []} ) {
delete $stats{users}{genders}{lc $kickee};
}
}
Expand Down Expand Up @@ -2521,7 +2521,7 @@ sub irc_on_part {

delete $stats{users}{$chl}{$who};

if ( !@{$irc->nick_channels( $who )} ) {
if ( !@{$irc->nick_channels( $who ) // []} ) {
delete $stats{users}{genders}{lc $who};
}
}
Expand Down

0 comments on commit 47698fd

Please sign in to comment.