diff -r 33bac54867bf -r 50341dec533e sources/network/rconsession.cpp --- a/sources/network/rconsession.cpp Sun Dec 14 18:15:28 2014 +0200 +++ b/sources/network/rconsession.cpp Sun Dec 14 19:38:47 2014 +0200 @@ -258,3 +258,20 @@ { return g_rconSession; } + +// ------------------------------------------------------------------------------------------------- +// Returns true if the message was successfully sent. +// +METHOD +RCONSession::send_command (const String& message) -> bool +{ + if (m_state != RCON_CONNECTED) + return false; + + Bytestream packet; + packet.write_byte (CLRC_COMMAND); + packet.write_string (message); + send (packet); + bump_last_ping(); + return true; +}