Add "bm_send <addr> <content>".

This commit is contained in:
/dev/urandom 2016-08-27 11:24:26 +02:00
parent 073e984f69
commit 738f9ee941
No known key found for this signature in database
GPG Key ID: 41322B973E0F295E

View File

@ -34,6 +34,26 @@ namespace Components
this->BMClient->start();
Command::Add("bm_send", [](Command::Params params) {
if (params.Length() < 3) return;
ustring pubAddrString;
pubAddrString.fromString(params[1]);
PubAddr pubAddr;
if (pubAddr.loadAddr(pubAddrString))
{
ustring msg;
msg.fromString(params.Join(2));
Logger::Print("Sending message (this may take a while)...\n");
Singleton->BMClient->sendMessage(msg, pubAddr, Singleton->BMClient->PrivAddresses[0]);
Logger::Print("Message sent.\n");
}
else
{
Logger::Print("Address not correct!\n");
}
});
Command::Add("bm_sendb", [](Command::Params params) {
if (params.Length() < 2) return;