sources/network/rconsession.cpp

changeset 22
77d02446edf0
parent 21
12e4ff8bb471
child 23
f7221183a994
equal deleted inserted replaced
21:12e4ff8bb471 22:77d02446edf0
261 // Returns true if the message was successfully sent. 261 // Returns true if the message was successfully sent.
262 // 262 //
263 METHOD 263 METHOD
264 RCONSession::send_command (const String& message) -> bool 264 RCONSession::send_command (const String& message) -> bool
265 { 265 {
266 if (m_state != RCON_CONNECTED) 266 if (m_state != RCON_CONNECTED or message.is_empty())
267 return false; 267 return false;
268 268
269 Bytestream packet; 269 Bytestream packet;
270 packet.write_byte (CLRC_COMMAND); 270 packet.write_byte (CLRC_COMMAND);
271 packet.write_string (message); 271 packet.write_string (message);

mercurial