diff options
author | Adam <Adam@anope.org> | 2011-12-19 15:37:15 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-12-19 15:37:15 -0500 |
commit | 45fc3ce1c41b06af6e03712988870ead95b72435 (patch) | |
tree | 7b574d077f77707edb3916fb43dfa30dec8b0f54 /modules/commands/os_config.cpp | |
parent | d320c73f23ff7a9b848b86b59c6bf91c1254e410 (diff) |
Fixed formatting of many lists and INFO outputs
Diffstat (limited to 'modules/commands/os_config.cpp')
-rw-r--r-- | modules/commands/os_config.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/modules/commands/os_config.cpp b/modules/commands/os_config.cpp index 4955aa473..ead2448ad 100644 --- a/modules/commands/os_config.cpp +++ b/modules/commands/os_config.cpp @@ -168,13 +168,25 @@ class CommandOSConfig : public Command if (ok == false) continue; - source.Reply(_("%s settings:"), bname.c_str()); + ListFormatter lflist; + lflist.addColumn("Name").addColumn("Value"); for (unsigned i = 0; i < list.size(); ++i) { const Anope::string &first = list[i].first, second = list[i].second; - source.Reply(_(" Name: %-15s Value: %s"), first.c_str(), second.c_str()); + ListFormatter::ListEntry entry; + entry["Name"] = first; + entry["Value"] = second; + lflist.addEntry(entry); } + + std::vector<Anope::string> replies; + lflist.Process(replies); + + source.Reply(_("%s settings:"), bname.c_str()); + + for (unsigned i = 0; i < replies.size(); ++i) + source.Reply(replies[i]); } source.Reply(_("End of configuration.")); |