From 15e7ae0fa0207ca2e71d37b6ef410e5bde016ab5 Mon Sep 17 00:00:00 2001 From: prozacx Date: Mon, 18 Jul 2005 02:00:24 +0000 Subject: [PATCH] Added GetString() git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@438 726aef4b-f618-498e-8847-2d620e286838 --- Server.cpp | 3 +++ Server.h | 1 + 2 files changed, 4 insertions(+) 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: