Skip to content

Commit

Permalink
Merge pull request #129 from dgw/better-gender-pruning
Browse files Browse the repository at this point in the history
Selectively prune gender cache on PART and KICK
  • Loading branch information
dgw authored Jun 14, 2020
2 parents 0db8446 + 304dc49 commit 366a8d6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bucket.pl
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,10 @@ sub irc_on_kick {
);

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

if ( !@{$irc->nick_channels( $kickee )} ) {
delete $stats{users}{genders}{lc $who};
}
}

sub irc_on_quit {
Expand Down Expand Up @@ -2517,7 +2521,9 @@ sub irc_on_part {

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

delete $stats{users}{genders}{lc $who};
if ( !@{$irc->nick_channels( $who )} ) {
delete $stats{users}{genders}{lc $who};
}
}

sub irc_on_chan_sync {
Expand Down

0 comments on commit 366a8d6

Please sign in to comment.