From 803b34c6dc795071f210271b0dfdc8203a211d7d Mon Sep 17 00:00:00 2001 From: psychon Date: Sat, 24 May 2008 21:13:36 +0000 Subject: [PATCH] Simplify this a little by using the new-and-improved (tm) CZNC::Broadcast() git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1071 726aef4b-f618-498e-8847-2d620e286838 --- znc.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/znc.cpp b/znc.cpp index 46d1c3f6..a668035c 100644 --- a/znc.cpp +++ b/znc.cpp @@ -198,18 +198,11 @@ int CZNC::Loop() { if (GetNeedRehash()) { SetNeedRehash(false); - bool b = RehashConfig(sError); - - end = m_msUsers.end(); - for (it = m_msUsers.begin(); it != end; it++) { - if (it->second->IsAdmin()) { - if (b) { - it->second->PutStatus("Rehashing succeeded"); - } else { - it->second->PutStatus("Rehashing failed: " + sError); - it->second->PutStatus("ZNC is in some possibly inconsistent state!"); - } - } + if (RehashConfig(sError)) { + Broadcast("Rehashing succeeded", true); + } else { + Broadcast("Rehashing failed: " + sError, true); + Broadcast("ZNC is in some possibly inconsistent state!", true); } }