| 872 | } |
| 873 | |
| 874 | void MainInterface::doChat(String const& chat, bool addToHistory) { |
| 875 | if (chat.empty()) |
| 876 | return; |
| 877 | |
| 878 | if (chat.beginsWith("/")) { |
| 879 | m_lastCommand = chat; |
| 880 | |
| 881 | for (auto const& result : m_clientCommandProcessor->handleCommand(chat, true)) |
| 882 | m_chat->addLine(result); |
| 883 | } else { |
| 884 | m_client->sendChat(chat, m_chat->sendMode()); |
| 885 | } |
| 886 | |
| 887 | if (addToHistory) |
| 888 | m_chat->addHistory(chat); |
| 889 | } |
| 890 | |
| 891 | void MainInterface::queueMessage(String const& message, Maybe<float> cooldown, float spring) { |
| 892 | auto guiMessage = make_shared<GuiMessage>(message, cooldown.value(m_config->messageTime), spring); |
nothing calls this directly
no test coverage detected