mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Merge commit 'refs/pull/349/head' of github.com:znc/znc
This commit is contained in:
@@ -866,6 +866,21 @@ bool CWebSock::OnLogin(const CString& sUser, const CString& sPass) {
|
||||
return IsLoggedIn();
|
||||
}
|
||||
|
||||
CString CWebSock::GetRemoteIP()
|
||||
{
|
||||
const VCString& vsProxies = CZNC::Get().GetAllowProxies();
|
||||
CString sIP = CHTTPSock::GetRemoteIP();
|
||||
|
||||
VCString::const_iterator it;
|
||||
for (it = vsProxies.begin(); it != vsProxies.end(); ++it) {
|
||||
if (sIP.WildCmp(*it)) {
|
||||
return m_sForwardedIP;
|
||||
}
|
||||
}
|
||||
|
||||
return sIP;
|
||||
}
|
||||
|
||||
Csock* CWebSock::GetSockObj(const CString& sHost, unsigned short uPort) {
|
||||
// All listening is done by CListener, thus CWebSock should never have
|
||||
// to listen, but since GetSockObj() is pure virtual...
|
||||
|
||||
Reference in New Issue
Block a user