From 3034d1f81aa794267679a6d9011fd8ddfdee7ca1 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Fri, 13 May 2011 16:40:40 +0200 Subject: [PATCH] Make it possible to use ExpandString-stuff in QuitMsg You can now use "Uptime: %uptime%" as your quit message, yay! Signed-off-by: Uli Schlachter --- IRCSock.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); }