From 8b7a9d46bd7f885ee2296bbcfed1b58d44af46d0 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Mon, 4 May 2020 19:05:11 -0700 Subject: [PATCH] Users: fix minor autovivification issue when decaching non-existent users --- PBot/Users.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PBot/Users.pm b/PBot/Users.pm index e942167e..a67989c7 100644 --- a/PBot/Users.pm +++ b/PBot/Users.pm @@ -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}; }