Table.SetCell("Host", a->second->GetHost());
}
- unsigned int uTableIdx = 0;
- CString sTmp;
-
- while (Table.GetLine(uTableIdx++, sTmp)) {
- PutStatus(sTmp);
- }
+ PutStatus(Table);
} else if (sCommand.CaseCmp("DETACH") == 0) {
if (m_pUser) {
CString sChan = sLine.Token(1);
Table.SetCell("Host", vClients[a]->GetRemoteIP());
}
- if (Table.size()) {
- unsigned int uTableIdx = 0;
- CString sTmp;
-
- while (Table.GetLine(uTableIdx++, sTmp)) {
- PutStatus(sTmp);
- }
- }
+ PutStatus(Table);
}
} else if (m_pUser->IsAdmin() && sCommand.CaseCmp("LISTUSERS") == 0) {
const map<CString, CUser*>& msUsers = CZNC::Get().GetUserMap();
}
}
- if (Table.size()) {
- unsigned int uTableIdx = 0;
- CString sTmp;
-
- while (Table.GetLine(uTableIdx++, sTmp)) {
- PutStatus(sTmp);
- }
- }
+ PutStatus(Table);
} else if (m_pUser->IsAdmin() && sCommand.CaseCmp("SetMOTD") == 0) {
CString sMessage = sLine.Token(1, true);
}
}
- if (Table.size()) {
- unsigned int uTableIdx = 0;
- CString sTmp;
-
- while (Table.GetLine(uTableIdx++, sTmp)) {
- PutStatus(sTmp);
- }
- }
+ PutStatus(Table);
}
} else if (sCommand.CaseCmp("ADDSERVER") == 0) {
CString sServer = sLine.Token(1);
Table.SetCell("Pass", pServer->GetPass());
}
- if (Table.size()) {
- unsigned int uTableIdx = 0;
- CString sTmp;
-
- while (Table.GetLine(uTableIdx++, sTmp)) {
- PutStatus(sTmp);
- }
- }
+ PutStatus(Table);
} else {
PutStatus("You don't have any servers added.");
}
Table.SetCell("Topic", pChan->GetTopic());
}
- if (Table.size()) {
- unsigned int uTableIdx = 0;
- CString sTmp;
-
- while (Table.GetLine(uTableIdx++, sTmp)) {
- PutStatus(sTmp);
- }
- }
+ PutStatus(Table);
}
} else if (sCommand.CaseCmp("SEND") == 0) {
CString sToNick = sLine.Token(1);
}
}
- if (Table.size()) {
- unsigned int uTableIdx = 0;
- CString sTmp;
-
- while (Table.GetLine(uTableIdx++, sTmp)) {
- PutStatus(sTmp);
- }
- } else {
+ if (PutStatus(Table) == 0) {
PutStatus("You have no active DCCs.");
}
} else if ((sCommand.CaseCmp("LISTMODS") == 0) || (sCommand.CaseCmp("LISTMODULES") == 0)) {
GTable.SetCell("Description", GModules[b]->GetDescription().Ellipsize(128));
}
- unsigned int uTableIdx = 0;
- CString sTmp;
- while (GTable.GetLine(uTableIdx++, sTmp)) {
- PutStatus(sTmp);
- }
+ PutStatus(GTable);
}
}
Table.SetCell("Description", Modules[b]->GetDescription().Ellipsize(128));
}
- unsigned int uTableIdx = 0;
- CString sTmp;
- while (Table.GetLine(uTableIdx++, sTmp)) {
- PutStatus(sTmp);
- }
+ PutStatus(Table);
}
}
#else
GTable.SetCell("Description", Info.GetDescription().Ellipsize(128));
}
- unsigned int uTableIdx = 0;
- CString sTmp;
-
- while (GTable.GetLine(uTableIdx++, sTmp)) {
- PutStatus(sTmp);
- }
+ PutStatus(GTable);
}
}
Table.SetCell("Description", Info.GetDescription().Ellipsize(128));
}
- unsigned int uTableIdx = 0;
- CString sTmp;
- while (Table.GetLine(uTableIdx++, sTmp)) {
- PutStatus(sTmp);
- }
+ PutStatus(Table);
}
}
#else
Table.SetCell("Out", CString::ToByteStr(users_total_out + CZNC::Get().BytesWritten()));
Table.SetCell("Total", CString::ToByteStr(users_total_in + CZNC::Get().BytesRead() + users_total_out + CZNC::Get().BytesWritten()));
- if (Table.size()) {
- unsigned int uTableIdx = 0;
- CString sTmp;
- while (Table.GetLine(uTableIdx++, sTmp)) {
- PutStatus(sTmp);
- }
- }
+ PutStatus(Table);
} else if (m_pUser->IsAdmin() && sCommand.CaseCmp("UPTIME") == 0) {
PutStatus("Running for " + CZNC::Get().GetUptime());
} else {
Table.SetCell("Description", "Restarts znc");
}
- if (Table.size()) {
- unsigned int uTableIdx = 0;
- CString sLine;
-
- while (Table.GetLine(uTableIdx++, sLine)) {
- PutStatus(sLine);
- }
- }
+ PutStatus(Table);
}