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
This commit is contained in:
psychon
2008-05-24 21:13:36 +00:00
parent a773c13f69
commit 803b34c6dc
+5 -12
View File
@@ -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);
}
}