Use CString::StartsWith()

Replace the use of deprecated CString::Equals(str,bool,int) by
CString::StartsWith(str,cs) which is more pleasant to read.
This commit is contained in:
J-P Nurmi
2015-02-18 00:42:25 +01:00
parent a8b9542925
commit 00b1a7eedf
15 changed files with 24 additions and 28 deletions

View File

@@ -144,7 +144,7 @@ void CIMAPSock::ReadLine(const CString& sLine) {
} else if (sLine.Left(5) == "AUTH ") {
CUser* pUser = CZNC::Get().FindUser(m_spAuth->GetUsername());
if (pUser && sLine.Equals("AUTH OK", false, 7)) {
if (pUser && sLine.StartsWith("AUTH OK")) {
m_spAuth->AcceptLogin(*pUser);
m_pIMAPMod->CacheLogin(CString(m_spAuth->GetUsername() + ":" + m_spAuth->GetPassword()).MD5()); // Use MD5 so passes don't sit in memory in plain text
DEBUG("+++ Successful IMAP lookup");