Add feedback when .wallop message is sent

This does the following:
- Opens a message-tab called "SUP" when a .wallop message is sent.
- Throws a validation error if another message is directly send into this "SUP" channel as another .wallop should be used.
This commit is contained in:
Lars Toenning
2020-07-26 11:57:59 +02:00
parent c4202d73f5
commit f987b81e6d
6 changed files with 33 additions and 0 deletions

View File

@@ -208,6 +208,12 @@ namespace BlackMisc
return cs.isBroadcastCallsign();
}
bool CTextMessage::isWallopMessage() const
{
const CCallsign cs = this->getRecipientCallsign();
return cs.getStringAsSet() == "*S";
}
QString CTextMessage::asString(bool withSender, bool withRecipient, const QString &separator) const
{
QString s(this->getFormattedUtcTimestampHms());

View File

@@ -117,6 +117,9 @@ namespace BlackMisc
//! Is this a broadcast message
bool isBroadcastMessage() const;
//! Is this a message send via .wallop
bool isWallopMessage() const;
//! Whole message as formatted string. Used to display message in a console window.
//! \param withSender include sender information in string?
//! \param withRecipient include recipient information in string?