mirror of
https://github.com/znc/znc.git
synced 2026-05-05 21:12:37 +02:00
Update to latest Csocket
This adds Csock::ConvertAddress() which produces printable addresses. We use this function in CZNCSock to strip away 4in6 prefixes (e.g. ::ffff:127.0.0.1). git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1930 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -28,6 +28,12 @@ unsigned int CSockManager::GetAnonConnectionCount(const CString &sIP) const {
|
||||
return ret;
|
||||
}
|
||||
|
||||
CS_STRING CZNCSock::ConvertAddress(void *addr, bool ipv6) {
|
||||
CString sRet = Csock::ConvertAddress(addr, ipv6);
|
||||
sRet.TrimPrefix("::ffff:");
|
||||
return sRet;
|
||||
}
|
||||
|
||||
/////////////////// CSocket ///////////////////
|
||||
CSocket::CSocket(CModule* pModule) : CZNCSock() {
|
||||
m_pModule = pModule;
|
||||
|
||||
Reference in New Issue
Block a user