summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2016-09-25 21:41:05 +0100
committerPeter Powell <petpow@saberuk.com>2016-09-25 21:45:46 +0100
commitd3b82b2f7f75f56c318830ad0cc0c6e3d3b4a7c6 (patch)
treec1dcbb03136645c6408f7427a970f7053af96624 /src
parente991c297d69d39438970f85b58010a447864d49e (diff)
Invalidate the caches properly when User::SetClientIP is called.
Diffstat (limited to 'src')
-rw-r--r--src/users.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 418f2c9aa..685ef9743 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -837,6 +837,7 @@ void LocalUser::FullConnect()
void User::InvalidateCache()
{
/* Invalidate cache */
+ cachedip.clear();
cached_fullhost.clear();
cached_hostip.clear();
cached_makehost.clear();
@@ -1001,8 +1002,7 @@ irc::sockets::cidr_mask User::GetCIDRMask()
bool User::SetClientIP(const char* sip, bool recheck_eline)
{
- cachedip.clear();
- cached_hostip.clear();
+ this->InvalidateCache();
return irc::sockets::aptosa(sip, 0, client_sa);
}