diff --git a/Server.cpp b/Server.cpp index bbdccd26..cc9105b0 100644 --- a/Server.cpp +++ b/Server.cpp @@ -31,3 +31,6 @@ unsigned short CServer::GetPort() const { return m_uPort; } const CString& CServer::GetPass() const { return m_sPass; } bool CServer::IsSSL() const { return m_bSSL; } +CString CServer::GetString() const { + return m_sName + " " + CString(m_bSSL ? "+" : "") + CString::ToString(m_uPort) + CString(m_sPass.empty() ? CString("") : " " + m_sPass); +} diff --git a/Server.h b/Server.h index df491ea9..3a6334ed 100644 --- a/Server.h +++ b/Server.h @@ -12,6 +12,7 @@ public: unsigned short GetPort() const; const CString& GetPass() const; bool IsSSL() const; + CString GetString() const; static bool IsValidHostName(const CString& sHostName); private: protected: