322 // ------------------------------------------------------------------------------------------------- |
322 // ------------------------------------------------------------------------------------------------- |
323 // Returns true if the message was successfully sent. |
323 // Returns true if the message was successfully sent. |
324 // |
324 // |
325 bool RCONSession::send_command (const String& message) |
325 bool RCONSession::send_command (const String& message) |
326 { |
326 { |
327 if (m_state != RCON_CONNECTED or message.is_empty()) |
327 if (m_state != RCON_CONNECTED or message.isEmpty()) |
328 return false; |
328 return false; |
329 |
329 |
330 Bytestream packet; |
330 Bytestream packet; |
331 packet.write_byte (CLRC_COMMAND); |
331 packet.write_byte (CLRC_COMMAND); |
332 packet.write_string (message); |
332 packet.write_string (message); |