]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
Fix BanCache entries existing after X-line expiry.
[user/henk/code/inspircd.git] / src / users.cpp
index af0e15f6549443972e8fe581d10bb37f8d105ca8..ac87f1187992cc943d1dab44cc9de778473ffcdb 100644 (file)
@@ -692,6 +692,7 @@ void User::UnOper()
        ServerInstance->Users->all_opers.remove(this);
 
        this->modes[UM_OPERATOR] = 0;
+       FOREACH_MOD(I_OnPostDeoper, OnPostDeoper(this));
 }
 
 /* adds or updates an entry in the whowas list */
@@ -837,6 +838,7 @@ void LocalUser::FullConnect()
 void User::InvalidateCache()
 {
        /* Invalidate cache */
+       cachedip.clear();
        cached_fullhost.clear();
        cached_hostip.clear();
        cached_makehost.clear();
@@ -1001,15 +1003,13 @@ 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);
 }
 
 void User::SetClientIP(const irc::sockets::sockaddrs& sa, bool recheck_eline)
 {
-       cachedip.clear();
-       cached_hostip.clear();
+       this->InvalidateCache();
        memcpy(&client_sa, &sa, sizeof(irc::sockets::sockaddrs));
 }