listify two-column tables

excluded are the Q and partyline modules, as they are deprecated. There
are some tables that have more than two columns, but could likely be
easily modified, but this will be attempted at a later time.
This commit is contained in:
girst
2019-05-29 17:41:38 +02:00
parent e528b5f2d6
commit fe8d447a60
12 changed files with 28 additions and 1 deletions

View File

@@ -888,6 +888,7 @@ void CClient::UserCommand(CString& sLine) {
CTable Table;
Table.AddColumn(t_s("Name", "listmods"));
Table.AddColumn(t_s("Arguments", "listmods"));
Table.SetStyle(CTable::ListStyle);
for (const CModule* pMod : Modules) {
Table.AddRow();
Table.SetCell(t_s("Name", "listmods"), pMod->GetModName());
@@ -898,6 +899,7 @@ void CClient::UserCommand(CString& sLine) {
if (m_pUser->IsAdmin()) {
const CModules& GModules = CZNC::Get().GetModules();
PutStatus("");
if (!GModules.size()) {
PutStatus(t_s("No global modules loaded."));
} else {
@@ -908,6 +910,7 @@ void CClient::UserCommand(CString& sLine) {
const CModules& UModules = m_pUser->GetModules();
PutStatus("");
if (!UModules.size()) {
PutStatus(t_s("Your user has no modules loaded."));
} else {
@@ -917,6 +920,7 @@ void CClient::UserCommand(CString& sLine) {
if (m_pNetwork) {
const CModules& NetworkModules = m_pNetwork->GetModules();
PutStatus("");
if (NetworkModules.empty()) {
PutStatus(t_s("This network has no modules loaded."));
} else {
@@ -937,6 +941,7 @@ void CClient::UserCommand(CString& sLine) {
CTable Table;
Table.AddColumn(t_s("Name", "listavailmods"));
Table.AddColumn(t_s("Description", "listavailmods"));
Table.SetStyle(CTable::ListStyle);
for (const CModInfo& Info : ssModules) {
Table.AddRow();
@@ -958,6 +963,7 @@ void CClient::UserCommand(CString& sLine) {
CZNC::Get().GetModules().GetAvailableMods(ssGlobalMods,
CModInfo::GlobalModule);
PutStatus("");
if (ssGlobalMods.empty()) {
PutStatus(t_s("No global modules available."));
} else {
@@ -969,6 +975,7 @@ void CClient::UserCommand(CString& sLine) {
set<CModInfo> ssUserMods;
CZNC::Get().GetModules().GetAvailableMods(ssUserMods);
PutStatus("");
if (ssUserMods.empty()) {
PutStatus(t_s("No user modules available."));
} else {
@@ -980,6 +987,7 @@ void CClient::UserCommand(CString& sLine) {
CZNC::Get().GetModules().GetAvailableMods(ssNetworkMods,
CModInfo::NetworkModule);
PutStatus("");
if (ssNetworkMods.empty()) {
PutStatus(t_s("No network modules available."));
} else {