Formatting /LIST response and making sure it always shows in status window.

master
Tomatix 5 years ago
parent 67d303f533
commit 366fbe2e51
  1. 2
      IRCClient/IRCBase.cpp
  2. 9
      IdealIRC/IRC.cpp

@ -18,7 +18,7 @@ using asio::ip::tcp;
namespace {
/* Debug/development options */
constexpr bool DumpReadData = false;
constexpr bool DumpReadData = true;
constexpr bool DumpWriteData = false;
const std::vector<std::string> V3Support {

@ -652,6 +652,15 @@ void IRC::onMsgNumeric(const IRCPrefix& /*sender*/, const std::string& num, cons
window->print(PrintType::Normal, msg.c_str());
}
else if (num == Numeric::RPL_LISTSTART) {
getStatus().print(PrintType::ProgramInfo, "Listing public channels...");
}
else if (num == Numeric::RPL_LIST) {
std::string msg = fmt::format("{} [{} users] {}", args[1], args[2], message);
getStatus().print(PrintType::Normal, QString::fromStdString(msg));
}
else {
IWin* window = nullptr;

Loading…
Cancel
Save