X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fusers.cpp;h=ac87f1187992cc943d1dab44cc9de778473ffcdb;hb=95c5aa91953db978879ec21c236a871257fe7036;hp=418f2c9aa3557f187e45eb189c892a07b154970c;hpb=ef335eb2de8e33550661c7dc826f471c3405c25f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/users.cpp b/src/users.cpp index 418f2c9aa..ac87f1187 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -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)); } @@ -1398,6 +1398,8 @@ void User::DoHostCycle(const std::string &quitline) FOREACH_MOD(I_OnBuildNeighborList,OnBuildNeighborList(this, include_c, exceptions)); + // Users shouldn't see themselves quitting when host cycling + exceptions.erase(this); for (std::map::iterator i = exceptions.begin(); i != exceptions.end(); ++i) { LocalUser* u = IS_LOCAL(i->first);