MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / SendChat

Function SendChat

src/network/network_chat_gui.cpp:253–261  ·  view source on GitHub ↗

* Send an actual chat message. * @param buf The message to send. * @param type The type of destination. * @param dest The actual destination index. */

Source from the content-addressed store, hash-verified

251 * @param dest The actual destination index.
252 */
253static void SendChat(std::string_view buf, DestType type, int dest)
254{
255 if (buf.empty()) return;
256 if (!_network_server) {
257 MyClient::SendChat((NetworkAction)(NETWORK_ACTION_CHAT + type), type, dest, buf, 0);
258 } else {
259 NetworkServerSendChat((NetworkAction)(NETWORK_ACTION_CHAT + type), type, dest, buf, CLIENT_ID_SERVER);
260 }
261}
262
263class NetworkChatAutoCompletion final : public AutoCompletion {
264public:

Callers 2

OnClickMethod · 0.85
NetworkClientSendChatFunction · 0.85

Calls 2

NetworkServerSendChatFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected