mirror of
https://github.com/znc/znc.git
synced 2026-08-03 23:43:42 +02:00
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:
+3
-1
@@ -1999,13 +1999,15 @@ CModCommand::CModCommand(const CString& sCmd, CmdFunc func,
|
||||
: m_sCmd(sCmd), m_pFunc(std::move(func)), m_Args(Args), m_Desc(Desc) {}
|
||||
|
||||
void CModCommand::InitHelp(CTable& Table) {
|
||||
Table.SetStyle(CTable::ListStyle);
|
||||
Table.AddColumn(t_s("Command", "modhelpcmd"));
|
||||
Table.AddColumn(t_s("Description", "modhelpcmd"));
|
||||
}
|
||||
|
||||
void CModCommand::AddHelp(CTable& Table) const {
|
||||
Table.AddRow();
|
||||
Table.SetCell(t_s("Command", "modhelpcmd"), GetCommand() + " " + GetArgs());
|
||||
Table.SetCell(t_s("Command", "modhelpcmd"),
|
||||
GetCommand() + (GetArgs().empty() ? "" : " ") + GetArgs());
|
||||
Table.SetCell(t_s("Description", "modhelpcmd"), GetDescription());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user