diff --git a/include/znc/Client.h b/include/znc/Client.h index 072cd570..3bc712d1 100644 --- a/include/znc/Client.h +++ b/include/znc/Client.h @@ -33,14 +33,14 @@ class CClient; class CAuthBase { public: - CAuthBase(const CString& sUsername, const CString& sPassword, Csock *pSock) { + CAuthBase(const CString& sUsername, const CString& sPassword, CZNCSock* pSock) { SetLoginInfo(sUsername, sPassword, pSock); } virtual ~CAuthBase() {} virtual void SetLoginInfo(const CString& sUsername, const CString& sPassword, - Csock *pSock) { + CZNCSock* pSock) { m_sUsername = sUsername; m_sPassword = sPassword; m_pSock = pSock; @@ -63,9 +63,9 @@ protected: virtual void RefusedLogin(const CString& sReason) = 0; private: - CString m_sUsername; - CString m_sPassword; - Csock* m_pSock; + CString m_sUsername; + CString m_sPassword; + CZNCSock* m_pSock; }; diff --git a/include/znc/HTTPSock.h b/include/znc/HTTPSock.h index 08919364..5971914e 100644 --- a/include/znc/HTTPSock.h +++ b/include/znc/HTTPSock.h @@ -56,7 +56,7 @@ public: void ParseURI(); void GetPage(); static CString GetDate(time_t tm = 0); - virtual CString GetRemoteIP() const; + CString GetRemoteIP() const override; // Cookies CString GetRequestCookie(const CString& sKey) const; diff --git a/include/znc/Socket.h b/include/znc/Socket.h index 395f0378..84b4f49e 100644 --- a/include/znc/Socket.h +++ b/include/znc/Socket.h @@ -42,6 +42,7 @@ public: // Don't fail to compile when ICU is not enabled void SetEncoding(const CString&) {} #endif + virtual CString GetRemoteIP() const { return Csock::GetRemoteIP(); } protected: // All existing errno codes seem to be in range 1-300 diff --git a/modules/bouncedcc.cpp b/modules/bouncedcc.cpp index dc1efa45..da3ac347 100644 --- a/modules/bouncedcc.cpp +++ b/modules/bouncedcc.cpp @@ -57,7 +57,7 @@ public: // Getters unsigned short GetUserPort() const { return m_uRemotePort; } - const CString& GetRemoteIP() const { return m_sRemoteIP; } + const CString& GetRemoteAddr() const { return m_sRemoteIP; } const CString& GetRemoteNick() const { return m_sRemoteNick; } const CString& GetFileName() const { return m_sFileName; } CDCCBounce* GetPeer() const { return m_pPeer; } @@ -105,7 +105,7 @@ public: if (!(pSock->IsRemote())) { Table.AddRow(); Table.SetCell("Nick", pSock->GetRemoteNick()); - Table.SetCell("IP", pSock->GetRemoteIP()); + Table.SetCell("IP", pSock->GetRemoteAddr()); if (pSock->IsChat()) { Table.SetCell("Type", "Chat");