3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-20 02:49:49 +01:00

Users: fix minor autovivification issue when decaching non-existent users

This commit is contained in:
Pragmatic Software 2020-05-04 19:05:11 -07:00
parent fd125849e2
commit 8b7a9d46bd

View File

@ -532,8 +532,9 @@ sub cache_user {
sub decache_user {
my ($self, $channel, $hostmask) = @_;
my $lc_channel = lc $channel;
my $lc_hostmask = lc $hostmask;
delete $self->{user_cache}->{lc $channel}->{$lc_hostmask};
delete $self->{user_cache}->{$lc_channel}->{$lc_hostmask} if exists $self->{user_cache}->{$lc_channel};
delete $self->{user_cache}->{global}->{$lc_hostmask};
}