diff options
author | Attila Molnar <attilamolnar@hush.com> | 2017-05-17 23:41:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-17 23:41:32 +0200 |
commit | df8015951b622363ec34a3ddc002199bd588551c (patch) | |
tree | 336f2e38ec2f13f3ca74c168a0bd815abd94ebb0 | |
parent | 00498efb00c1ffd1e4be507d017e691b55a21deb (diff) | |
parent | d3b82b2f7f75f56c318830ad0cc0c6e3d3b4a7c6 (diff) |
Merge pull request #1230 from SaberUK/insp20+ipcache
[2.0] Invalidate the caches properly when User::SetClientIP is called.
-rw-r--r-- | src/users.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/users.cpp b/src/users.cpp index af0e15f65..4dbb73a1f 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); } |