From: <kr...@us...> - 2008-09-26 12:52:17
|
Revision: 1216 http://znc.svn.sourceforge.net/znc/?rev=1216&view=rev Author: kroimon Date: 2008-09-26 12:52:07 +0000 (Fri, 26 Sep 2008) Log Message: ----------- Added descriptive lines to the LISTMODS and LISTAVAILMODS commands. Also did a few minor style changes. Modified Paths: -------------- trunk/ClientCommand.cpp Modified: trunk/ClientCommand.cpp =================================================================== --- trunk/ClientCommand.cpp 2008-09-26 12:51:36 UTC (rev 1215) +++ trunk/ClientCommand.cpp 2008-09-26 12:52:07 UTC (rev 1216) @@ -592,6 +592,7 @@ if (!GModules.size()) { PutStatus("No global modules loaded."); } else { + PutStatus("Global modules:"); CTable GTable; GTable.AddColumn("Name"); GTable.AddColumn("Description"); @@ -604,7 +605,6 @@ unsigned int uTableIdx = 0; CString sTmp; - while (GTable.GetLine(uTableIdx++, sTmp)) { PutStatus(sTmp); } @@ -616,24 +616,24 @@ if (!Modules.size()) { PutStatus("You have no modules loaded."); - return; - } + } else { + PutStatus("User modules:"); + CTable Table; + Table.AddColumn("Name"); + Table.AddColumn("Description"); - CTable Table; - Table.AddColumn("Name"); - Table.AddColumn("Description"); + for (unsigned int b = 0; b < Modules.size(); b++) { + Table.AddRow(); + Table.SetCell("Name", Modules[b]->GetModName()); + Table.SetCell("Description", Modules[b]->GetDescription().Ellipsize(128)); + } - for (unsigned int b = 0; b < Modules.size(); b++) { - Table.AddRow(); - Table.SetCell("Name", Modules[b]->GetModName()); - Table.SetCell("Description", Modules[b]->GetDescription().Ellipsize(128)); + unsigned int uTableIdx = 0; + CString sTmp; + while (Table.GetLine(uTableIdx++, sTmp)) { + PutStatus(sTmp); + } } - - unsigned int uTableIdx = 0; - CString sTmp; - while (Table.GetLine(uTableIdx++, sTmp)) { - PutStatus(sTmp); - } } #else PutStatus("Modules are not enabled."); @@ -653,6 +653,7 @@ if (!ssGlobalMods.size()) { PutStatus("No global modules available."); } else { + PutStatus("Global modules:"); CTable GTable; GTable.AddColumn("Name"); GTable.AddColumn("Description"); @@ -680,26 +681,26 @@ if (!ssUserMods.size()) { PutStatus("No user modules available."); - return; - } + } else { + PutStatus("User modules:"); + CTable Table; + Table.AddColumn("Name"); + Table.AddColumn("Description"); + set<CModInfo>::iterator 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", (m_pUser->GetModules().FindModule(Info.GetName()) ? "*" : " ") + Info.GetName()); + Table.SetCell("Description", Info.GetDescription().Ellipsize(128)); + } - for (it = ssUserMods.begin(); it != ssUserMods.end(); it++) { - const CModInfo& Info = *it; - Table.AddRow(); - Table.SetCell("Name", (m_pUser->GetModules().FindModule(Info.GetName()) ? "*" : " ") + Info.GetName()); - Table.SetCell("Description", Info.GetDescription().Ellipsize(128)); + unsigned int uTableIdx = 0; + CString sTmp; + while (Table.GetLine(uTableIdx++, sTmp)) { + PutStatus(sTmp); + } } - - unsigned int uTableIdx = 0; - CString sTmp; - while (Table.GetLine(uTableIdx++, sTmp)) { - PutStatus(sTmp); - } } #else PutStatus("Modules are not enabled."); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |