| 560 | |
| 561 | |
| 562 | void BZAdminClient::sendMessage(const std::string& msg, |
| 563 | PlayerId target) { |
| 564 | // local commands: |
| 565 | // /set lists all BZDB variables |
| 566 | if (msg == "/set") { |
| 567 | if (ui != NULL) { |
| 568 | BZDB.iterate(listSetVars, this); |
| 569 | } |
| 570 | return; |
| 571 | } |
| 572 | |
| 573 | char buffer[MessageLen]; |
| 574 | memset(buffer, 0, MessageLen); |
| 575 | strncpy(buffer, msg.c_str(), MessageLen - 1); |
| 576 | sLink.sendMessage(target, buffer); |
| 577 | } |
| 578 | |
| 579 | |
| 580 | // NOTE: This function assumes that there is only two message types. It is |
no test coverage detected