Added output table of modules with descriptions

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@365 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
prozacx
2005-05-26 20:41:45 +00:00
parent aac40491b3
commit 1c90fd9beb

42
znc.cpp
View File

@@ -294,7 +294,26 @@ bool CZNC::WriteNewConfig(const CString& sConfig) {
CUtils::PrintMessage("");
if (CUtils::GetBoolInput("Do you want to load any global modules?")) {
for (set<CModInfo>::iterator it = ssGlobalMods.begin(); it != ssGlobalMods.end(); it++) {
CTable Table;
Table.AddColumn("Name");
Table.AddColumn("Description");
set<CModInfo>::iterator it;
for (it = ssGlobalMods.begin(); it != ssGlobalMods.end(); it++) {
const CModInfo& Info = *it;
Table.AddRow();
Table.SetCell("Name", Info.GetName());
Table.SetCell("Description", Info.GetDescription().Ellipsize(128));
}
unsigned int uTableIdx = 0; CString sLine;
while (Table.GetLine(uTableIdx++, sLine)) {
CUtils::PrintMessage(sLine);
}
CUtils::PrintMessage("");
for (it = ssGlobalMods.begin(); it != ssGlobalMods.end(); it++) {
const CModInfo& Info = *it;
CString sName = Info.GetName();
@@ -361,7 +380,26 @@ bool CZNC::WriteNewConfig(const CString& sConfig) {
CUtils::PrintMessage("");
if (CUtils::GetBoolInput("Do you want to automatically load any user modules for this user?")) {
for (set<CModInfo>::iterator it = ssUserMods.begin(); it != ssUserMods.end(); it++) {
CTable Table;
Table.AddColumn("Name");
Table.AddColumn("Description");
set<CModInfo>::iterator it;
for (it = ssUserMods.begin(); it != ssUserMods.end(); it++) {
const CModInfo& Info = *it;
Table.AddRow();
Table.SetCell("Name", Info.GetName());
Table.SetCell("Description", Info.GetDescription().Ellipsize(128));
}
unsigned int uTableIdx = 0; CString sLine;
while (Table.GetLine(uTableIdx++, sLine)) {
CUtils::PrintMessage(sLine);
}
CUtils::PrintMessage("");
for (it = ssUserMods.begin(); it != ssUserMods.end(); it++) {
const CModInfo& Info = *it;
CString sName = Info.GetName();