256 STATIC METHOD |
256 STATIC METHOD |
257 RCONSession::get_session() -> RCONSession* |
257 RCONSession::get_session() -> RCONSession* |
258 { |
258 { |
259 return g_rconSession; |
259 return g_rconSession; |
260 } |
260 } |
|
261 |
|
262 // ------------------------------------------------------------------------------------------------- |
|
263 // Returns true if the message was successfully sent. |
|
264 // |
|
265 METHOD |
|
266 RCONSession::send_command (const String& message) -> bool |
|
267 { |
|
268 if (m_state != RCON_CONNECTED) |
|
269 return false; |
|
270 |
|
271 Bytestream packet; |
|
272 packet.write_byte (CLRC_COMMAND); |
|
273 packet.write_string (message); |
|
274 send (packet); |
|
275 bump_last_ping(); |
|
276 return true; |
|
277 } |