From 2031a82a77dcb8a2174f83d16e91496f8fffdab0 Mon Sep 17 00:00:00 2001 From: Jos Ahrens Date: Fri, 25 Sep 2015 13:11:33 +0200 Subject: [PATCH] Remove 'ok' from bootup ZNC previously sent 'ok' on a new line every time a process went alright in CUtils::PrintStatus No longer is this the case! ZNC now remains silent when everything is going well. --- src/Utils.cpp | 7 +++---- src/znc.cpp | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Utils.cpp b/src/Utils.cpp index ddfffa56..1ccbbdb4 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -339,11 +339,10 @@ void CUtils::PrintAction(const CString& sMessage) { void CUtils::PrintStatus(bool bSuccess, const CString& sMessage) { if (CDebug::StdoutIsTTY()) { if (bSuccess) { - fprintf(stdout, BOLD BLU "[" GRN " >> " BLU "]" DFL NORM); - fprintf(stdout, " %s\n", sMessage.empty() ? "ok" : sMessage.c_str()); + if (!sMessage.empty()) + fprintf(stdout, BOLD BLU "[" GRN " >> " BLU "]" DFL NORM " %s\n", sMessage.c_str()); } else { - fprintf(stdout, BOLD BLU "[" RED " !! " BLU "]" DFL NORM); - fprintf(stdout, BOLD RED " %s" DFL NORM "\n", sMessage.empty() ? "failed" : sMessage.c_str()); + fprintf(stdout, sMessage.empty() ? " failed\n" : BOLD BLU "[" RED " !! " BLU "]" DFL NORM BOLD RED " %s" DFL NORM "\n", sMessage.c_str()); } } else { if (bSuccess) { diff --git a/src/znc.cpp b/src/znc.cpp index a67f7e07..55933f8b 100644 --- a/src/znc.cpp +++ b/src/znc.cpp @@ -1044,7 +1044,7 @@ bool CZNC::LoadGlobal(CConfig& config, CString& sError) { bool bModRet = GetModules().LoadModule(sModName, sArgs, CModInfo::GlobalModule, nullptr, nullptr, sModRet); - CUtils::PrintStatus(bModRet, sModRet); + CUtils::PrintStatus(bModRet, bModRet ? "" : sModRet); if (!bModRet) { sError = sModRet; return false;