Remove some unused code for ipv6 from CServer (and from CUser)

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1294 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2008-12-19 13:43:56 +00:00
parent 979f2651f3
commit d254240866
4 changed files with 8 additions and 18 deletions
+1 -3
View File
@@ -8,12 +8,11 @@
#include "Server.h"
CServer::CServer(const CString& sName, unsigned short uPort, const CString& sPass, bool bSSL, bool bIPV6) {
CServer::CServer(const CString& sName, unsigned short uPort, const CString& sPass, bool bSSL) {
m_sName = sName;
m_uPort = (uPort) ? uPort : 6667;
m_sPass = sPass;
m_bSSL = bSSL;
m_bIPV6 = bIPV6;
}
CServer::~CServer() {}
@@ -38,7 +37,6 @@ const CString& CServer::GetName() const { return m_sName; }
unsigned short CServer::GetPort() const { return m_uPort; }
const CString& CServer::GetPass() const { return m_sPass; }
bool CServer::IsSSL() const { return m_bSSL; }
bool CServer::IsIPV6() const { return m_bIPV6; }
CString CServer::GetString() const {
return m_sName + " " + CString(m_bSSL ? "+" : "") + CString(m_uPort) + CString(m_sPass.empty() ? "" : " " + m_sPass);
+1 -3
View File
@@ -13,14 +13,13 @@
class CServer {
public:
CServer(const CString& sName, unsigned short uPort = 6667, const CString& sPass = "", bool bSSL = false, bool bIPV6 = false);
CServer(const CString& sName, unsigned short uPort = 6667, const CString& sPass = "", bool bSSL = false);
virtual ~CServer();
const CString& GetName() const;
unsigned short GetPort() const;
const CString& GetPass() const;
bool IsSSL() const;
bool IsIPV6() const;
CString GetString() const;
static bool IsValidHostName(const CString& sHostName);
private:
@@ -29,7 +28,6 @@ protected:
unsigned short m_uPort;
CString m_sPass;
bool m_bSSL;
bool m_bIPV6;
};
#endif // !_SERVER_H
+4 -10
View File
@@ -730,7 +730,7 @@ bool CUser::DelServer(const CString& sName) {
return false;
}
bool CUser::AddServer(const CString& sName, bool bIPV6) {
bool CUser::AddServer(const CString& sName) {
if (sName.empty()) {
return false;
}
@@ -750,22 +750,16 @@ bool CUser::AddServer(const CString& sName, bool bIPV6) {
unsigned short uPort = strtoul(sPort.c_str(), NULL, 10);
CString sPass = sLine.Token(2, true);
return AddServer(sHost, uPort, sPass, bSSL, bIPV6);
return AddServer(sHost, uPort, sPass, bSSL);
}
bool CUser::AddServer(const CString& sName, unsigned short uPort, const CString& sPass, bool bSSL, bool bIPV6) {
bool CUser::AddServer(const CString& sName, unsigned short uPort, const CString& sPass, bool bSSL) {
#ifndef HAVE_LIBSSL
if (bSSL) {
return false;
}
#endif
#ifndef HAVE_IPV6
if (bIPV6) {
return false;
}
#endif
if (sName.empty()) {
return false;
}
@@ -774,7 +768,7 @@ bool CUser::AddServer(const CString& sName, unsigned short uPort, const CString&
uPort = 6667;
}
CServer* pServer = new CServer(sName, uPort, sPass, bSSL, bIPV6);
CServer* pServer = new CServer(sName, uPort, sPass, bSSL);
m_vServers.push_back(pServer);
CheckIRCConnect();
+2 -2
View File
@@ -43,8 +43,8 @@ public:
void JoinChans();
CServer* FindServer(const CString& sName) const;
bool DelServer(const CString& sName);
bool AddServer(const CString& sName, bool bIPV6 = false);
bool AddServer(const CString& sName, unsigned short uPort, const CString& sPass = "", bool bSSL = false, bool bIPV6 = false);
bool AddServer(const CString& sName);
bool AddServer(const CString& sName, unsigned short uPort, const CString& sPass = "", bool bSSL = false);
CServer* GetNextServer();
CServer* GetCurrentServer() const;
bool CheckPass(const CString& sPass) const;