diff --git a/IRCSock.cpp b/IRCSock.cpp index a4fdddc6..7f49fe2f 100644 --- a/IRCSock.cpp +++ b/IRCSock.cpp @@ -76,8 +76,11 @@ void CIRCSock::Quit(const CString& sQuitMsg) { Close(CLT_NOW); return; } - CString sMsg = (!sQuitMsg.empty()) ? sQuitMsg : m_pUser->GetQuitMsg(); - PutIRC("QUIT :" + sMsg); + if (!sQuitMsg.empty()) { + PutIRC("QUIT :" + sQuitMsg); + } else { + PutIRC("QUIT :" + m_pUser->ExpandString(m_pUser->GetQuitMsg())); + } Close(CLT_AFTERWRITE); }