Permalink
Browse files

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 <psychon@znc.in>
  • Loading branch information...
psychon committed May 13, 2011
1 parent eb22965 commit 3034d1f81aa794267679a6d9011fd8ddfdee7ca1
Showing with 5 additions and 2 deletions.
  1. +5 −2 IRCSock.cpp
View
@@ -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);
}

0 comments on commit 3034d1f

Please sign in to comment.