[FSD] wallop message sending incomplete fixed

This commit is contained in:
Klaus Basan
2019-11-26 22:48:13 +01:00
committed by Mat Sutcliffe
parent 2a34786039
commit b9ea40e8d1
3 changed files with 11 additions and 5 deletions

View File

@@ -402,7 +402,7 @@ namespace BlackCore
}
}
const QString msg(parser.remainingStringAfter(2));
const QString msg(parser.partAndRemainingStringAfter(2));
tm.setMessage(msg);
if (tm.isEmpty())
{
@@ -490,7 +490,12 @@ namespace BlackCore
if (parser.countParts() < 2) { return false; }
if (!m_fsdClient) { return false; }
if (!this->isConnected()) { return false; }
const QString wallopMsg = parser.part(1).simplified().trimmed();
const QString wallopMsg = parser.partAndRemainingStringAfter(1);
if (wallopMsg.isEmpty())
{
CLogMessage(this).validationError(u"No wallop message body");
return false;
}
m_fsdClient->sendTextMessage(TextMessageGroups::AllSups, wallopMsg);
return true;
}