]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Merge pull request #1230 from SaberUK/insp20+ipcache
authorAttila Molnar <attilamolnar@hush.com>
Wed, 17 May 2017 21:41:32 +0000 (23:41 +0200)
committerGitHub <noreply@github.com>
Wed, 17 May 2017 21:41:32 +0000 (23:41 +0200)
[2.0] Invalidate the caches properly when User::SetClientIP is called.

src/users.cpp

index af0e15f6549443972e8fe581d10bb37f8d105ca8..4dbb73a1f55ef7e4e5492784d1165d283c832c53 100644 (file)
@@ -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);
 }