365 // ------------------------------------------------------------------------------------------------- |
365 // ------------------------------------------------------------------------------------------------- |
366 // Returns true if the message was successfully sent. |
366 // Returns true if the message was successfully sent. |
367 // |
367 // |
368 bool RCONSession::send_command (const String& message) |
368 bool RCONSession::send_command (const String& message) |
369 { |
369 { |
370 if (m_state != RCON_CONNECTED or message.is_empty()) |
370 if (m_state != RCON_CONNECTED or message.isEmpty()) |
371 return false; |
371 return false; |
372 |
372 |
373 Bytestream packet; |
373 Bytestream packet; |
374 packet.write_byte (CLRC_COMMAND); |
374 packet.write_byte (CLRC_COMMAND); |
375 packet.write_string (message); |
375 packet.write_string (message); |