Use the new CModule::PutModule(const CTable&) in various modules

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1169 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2008-08-24 12:51:04 +00:00
parent b70a115a28
commit adcca250e1
7 changed files with 13 additions and 69 deletions
+2 -12
View File
@@ -90,12 +90,7 @@ public:
}
if (Table.size()) {
unsigned int uTableIdx = 0;
CString sTmp;
while (Table.GetLine(uTableIdx++, sTmp)) {
PutModule(sTmp);
}
PutModule(Table);
} else {
PutModule("You have no entries.");
}
@@ -117,12 +112,7 @@ public:
Table.SetCell("Description", "List all entries");
if (Table.size()) {
unsigned int uTableIdx = 0;
CString sTmp;
while (Table.GetLine(uTableIdx++, sTmp)) {
PutModule(sTmp);
}
PutModule(Table);
} else {
PutModule("You have no entries.");
}
+1 -6
View File
@@ -257,12 +257,7 @@ public:
Table.SetCell("Channels", it->second->GetChannels());
}
CString sTmp;
unsigned int uTableIdx = 0;
while (Table.GetLine(uTableIdx++, sTmp)) {
PutModule(sTmp);
}
PutModule(Table);
} else if (sCommand.CaseCmp("ADDCHANS") == 0 || sCommand.CaseCmp("DELCHANS") == 0) {
CString sUser = sLine.Token(1);
CString sChans = sLine.Token(2, true);
+1 -8
View File
@@ -132,14 +132,7 @@ public:
Table.SetCell("Key", it->second);
}
if (Table.size()) {
unsigned int uTableIdx = 0;
CString sLine;
while (Table.GetLine(uTableIdx++, sLine)) {
PutModule(sLine);
}
}
PutModule(Table);
}
} else if (sCmd.CaseCmp("HELP") == 0) {
PutModule("Try: SetKey, DelKey, ListKeys");
+1 -5
View File
@@ -122,11 +122,7 @@ public:
m_ssUidls = ssUidls; // keep the list in synch
if (Table.size()) {
unsigned int uTableIdx = 0;
CString sLine;
while (Table.GetLine(uTableIdx++, sLine)) {
PutModule(sLine);
}
PutModule(Table);
stringstream s;
s << "You have " << vEmails.size() << " emails.";
+2 -12
View File
@@ -427,12 +427,7 @@ public:
Table.SetCell("Arguments", "<channel>");
Table.SetCell("Description", "Show which users can not part this channel");
unsigned int uTableIdx = 0;
CString sTmp;
while (Table.GetLine(uTableIdx++, sTmp)) {
PutModule(sTmp);
}
PutModule(Table);
} else if (sCommand.CaseCmp("LIST") == 0) {
if (!m_ssChannels.size()) {
PutModule("There are no open channels.");
@@ -451,12 +446,7 @@ public:
Table.SetCell("Users", CString((*a)->GetNicks().size()));
}
unsigned int uTableIdx = 0;
CString sTmp;
while (Table.GetLine(uTableIdx++, sTmp)) {
PutModule(sTmp);
}
PutModule(Table);
} else if (sCommand.CaseCmp("ADDFIXCHAN") == 0) {
if (!m_pUser->IsAdmin()) {
PutModule("Access denied");
+4 -12
View File
@@ -265,12 +265,8 @@ public:
Table.SetCell("Port", CString(pSock->GetLocalPort()));
}
}
if (Table.size())
{
unsigned int uTableIdx = 0;
CString sLine;
while (Table.GetLine(uTableIdx++, sLine))
PutModule(sLine);
if (Table.size()) {
PutModule(Table);
} else
PutModule("No SDCCs currently in session");
@@ -342,12 +338,8 @@ public:
}
}
if (Table.size())
{
unsigned int uTableIdx = 0;
CString sLine;
while (Table.GetLine(uTableIdx++, sLine))
PutModule(sLine);
} else
PutModule(Table);
else
PutModule("Error Finding Sockets");
} else if (sCom.CaseCmp("help") == 0)
+2 -14
View File
@@ -336,12 +336,7 @@ private:
}
if (Table.size()) {
unsigned int uTableIdx = 0;
CString sLine;
while (Table.GetLine(uTableIdx++, sLine)) {
PutModule(sLine);
}
PutModule(Table);
} else {
PutModule("You have no entries.");
}
@@ -451,14 +446,7 @@ private:
Table.SetCell("Command", "Help");
Table.SetCell("Description", "This help.");
if (Table.size()) {
unsigned int uTableIdx = 0;
CString sLine;
while (Table.GetLine(uTableIdx++, sLine)) {
PutModule(sLine);
}
}
PutModule(Table);
}
void Watch(const CString& sHostMask, const CString& sTarget, const CString& sPattern, bool bNotice = false) {