diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-03-03 23:13:54 +0100 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-03-11 20:48:58 +0100 |
commit | fe9e5947552cc8b044a7ce47ffbee06ee7283886 (patch) | |
tree | 55a81f48ccfe503d4d6ed84798d042ee87b92ca8 /src/users.cpp | |
parent | 2bdbb2878efb600af81513147983aeac7bd62331 (diff) |
Fix m_dnsbl not checking cgiirc users when the cgiirc address is elined
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
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)); } } |