sources/network/rconsession.cpp

branch
protocol5
changeset 136
8fb1c657e0b0
parent 131
4996c8684b93
child 141
d9073c13dc98
equal deleted inserted replaced
135:966c09c34ae1 136:8fb1c657e0b0
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

mercurial