Added ipv6 support and multiple listen ports

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@641 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
prozacx
2006-02-11 10:06:45 +00:00
parent 7c52a7862e
commit ca8247058f
7 changed files with 158 additions and 69 deletions
+11 -4
View File
@@ -597,7 +597,7 @@ bool CUser::DelServer(const CString& sName) {
return false;
}
bool CUser::AddServer(const CString& sName) {
bool CUser::AddServer(const CString& sName, bool bIPV6) {
if (sName.empty()) {
return false;
}
@@ -617,15 +617,22 @@ bool CUser::AddServer(const CString& sName) {
unsigned short uPort = strtoul(sPort.c_str(), NULL, 10);
CString sPass = sLine.Token(2, true);
return AddServer(sHost, uPort, sPass, bSSL);
return AddServer(sHost, uPort, sPass, bSSL, bIPV6);
}
bool CUser::AddServer(const CString& sName, unsigned short uPort, const CString& sPass, bool bSSL) {
bool CUser::AddServer(const CString& sName, unsigned short uPort, const CString& sPass, bool bSSL, bool bIPV6) {
#ifndef HAVE_LIBSSL
if (bSSL) {
return false;
}
#endif
#ifndef HAVE_IPV6
if (bIPV6) {
return false;
}
#endif
if (sName.empty()) {
return false;
}
@@ -634,7 +641,7 @@ bool CUser::AddServer(const CString& sName, unsigned short uPort, const CString&
uPort = 6667;
}
CServer* pServer = new CServer(sName, uPort, sPass, bSSL);
CServer* pServer = new CServer(sName, uPort, sPass, bSSL, bIPV6);
m_vServers.push_back(pServer);
return true;