368 { |
368 { |
369 if (m_state != RCON_CONNECTED or message.is_empty()) |
369 if (m_state != RCON_CONNECTED or message.is_empty()) |
370 return false; |
370 return false; |
371 |
371 |
372 Bytestream packet; |
372 Bytestream packet; |
373 |
373 packet.write_byte (CLRC_COMMAND); |
374 // Let's hardcode a /watch for CVar watching testing purposes |
374 packet.write_string (message); |
375 if (message.starts_with ("/watch ")) |
|
376 { |
|
377 request_watch(message.mid(String("/watch ").length(), -1).split(',')); |
|
378 } |
|
379 else |
|
380 { |
|
381 packet.write_byte (CLRC_COMMAND); |
|
382 packet.write_string (message); |
|
383 } |
|
384 |
|
385 send (packet); |
375 send (packet); |
386 bump_last_ping(); |
376 bump_last_ping(); |
387 return true; |
377 return true; |
388 } |
378 } |
389 |
379 |