X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fusers.cpp;h=adfa7642cffc7278cfb0aa4fd8592db9422a4324;hb=dbc6dc90283220c06b4f4946cf0a131d2f965884;hp=30df3c153acf7655ab0f181fe6b4d63b6a3aa147;hpb=71d53e4883cdb83b50f43cd934ac9b4cd2b95383;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/users.cpp b/src/users.cpp index 30df3c153..adfa7642c 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -987,36 +987,39 @@ irc::sockets::cidr_mask User::GetCIDRMask() return irc::sockets::cidr_mask(client_sa, range); } -bool User::SetClientIP(const char* sip) +bool User::SetClientIP(const char* sip, bool recheck_eline) { cachedip.clear(); cached_hostip.clear(); return irc::sockets::aptosa(sip, 0, client_sa); } -void User::SetClientIP(const irc::sockets::sockaddrs& sa) +void User::SetClientIP(const irc::sockets::sockaddrs& sa, bool recheck_eline) { cachedip.clear(); cached_hostip.clear(); memcpy(&client_sa, &sa, sizeof(irc::sockets::sockaddrs)); } -bool LocalUser::SetClientIP(const char* sip) +bool LocalUser::SetClientIP(const char* sip, bool recheck_eline) { irc::sockets::sockaddrs sa; if (!irc::sockets::aptosa(sip, 0, sa)) // Invalid return false; - LocalUser::SetClientIP(sa); + LocalUser::SetClientIP(sa, recheck_eline); return true; } -void LocalUser::SetClientIP(const irc::sockets::sockaddrs& sa) +void LocalUser::SetClientIP(const irc::sockets::sockaddrs& sa, bool recheck_eline) { if (sa != client_sa) { User::SetClientIP(sa); + if (recheck_eline) + this->exempt = (ServerInstance->XLines->MatchesLine("E", this) != NULL); + FOREACH_MOD(I_OnSetUserIP,OnSetUserIP(this)); } }