diff --git a/global.h b/global.h
index 9d87ed9..2d45d9d 100644
--- a/global.h
+++ b/global.h
@@ -7,6 +7,7 @@ class QString;
namespace global
{
+ const QString BLINDED_MESSAGE_MERKER = "Blinded message";
#ifdef WIN32
const char slash = '\\';
#else
diff --git a/httpserver.cpp b/httpserver.cpp
index 41ed6dd..601083f 100644
--- a/httpserver.cpp
+++ b/httpserver.cpp
@@ -770,6 +770,10 @@ void HttpServer::writeMainPage(QTcpSocket *socket, QString &urlPath, bool isHead
}
counter++;
QString message = HTML_PAYLOAD_LIST_CHAT_MESSAGE;
+ if (rawMessage.second == global::BLINDED_MESSAGE_MERKER) {
+ message.replace("class=\"main_payload__chat\"",
+ "class=\"main_payload__chat\" style=\"opacity: .5\"");
+ }
for (const auto &user: m_servers[originalServerName][originalChannelName]) {
if (QRegularExpression("^(.*;|~|@|\\&|\\+)?"+rawMessage.first+"$").match(user).hasMatch()) {
message.replace("
",
@@ -827,6 +831,10 @@ void HttpServer::writeMainPage(QTcpSocket *socket, QString &urlPath, bool isHead
}
counter++;
QString message = HTML_PAYLOAD_LIST_CHAT_MESSAGE;
+ if (rawMessage.second == global::BLINDED_MESSAGE_MERKER) {
+ message.replace("class=\"main_payload__chat\"",
+ "class=\"main_payload__chat\" style=\"opacity: .5\"");
+ }
for (const auto &user: m_servers[originalServerName][originalChannelName]) {
if (QRegularExpression("^^(.*;|~|@|\\&|\\+)?"+rawMessage.first+"$").match(user).hasMatch()) {
message.replace("
",
@@ -907,6 +915,10 @@ void HttpServer::writeMainPage(QTcpSocket *socket, QString &urlPath, bool isHead
}
counter++;
QString message = HTML_PAYLOAD_LIST_CHAT_MESSAGE;
+ if (rawMessage.second == global::BLINDED_MESSAGE_MERKER) {
+ message.replace("class=\"main_payload__chat\"",
+ "class=\"main_payload__chat\" style=\"opacity: .5\"");
+ }
for (const auto &user: m_servers[originalServerName][originalChannelName]) {
if (QRegularExpression("^^(.*;|~|@|\\&|\\+)?"+rawMessage.first+"$").match(user).hasMatch()) {
message.replace("
",
@@ -1084,6 +1096,10 @@ void HttpServer::writeMainPage(QTcpSocket *socket, QString &urlPath, bool isHead
}
QString message = HTML_PAYLOAD_LIST_CHAT_MESSAGE;
+ if (rawMessage.second == global::BLINDED_MESSAGE_MERKER) {
+ message.replace("class=\"main_payload__chat\"",
+ "class=\"main_payload__chat\" style=\"opacity: .5\"");
+ }
for (const auto &user: m_servers[originalServerName][originalChannelName]) {
if (QRegularExpression("^(.*;|~|@|\\&|\\+)?"+rawMessage.first+"$").match(user).hasMatch()) {
message.replace("
",
@@ -1304,6 +1320,10 @@ void HttpServer::writeRealTimeChatPage(QTcpSocket *socket, QString &urlPath, boo
}
QString message = HTML_PAYLOAD_LIST_CHAT_MESSAGE;
+ if (rawMessage.second == global::BLINDED_MESSAGE_MERKER) {
+ message.replace("class=\"main_payload__chat\"",
+ "class=\"main_payload__chat\" style=\"opacity: .5\"");
+ }
message.replace("
",
"
");
diff --git a/ircclient.cpp b/ircclient.cpp
index f0c3887..95c1233 100644
--- a/ircclient.cpp
+++ b/ircclient.cpp
@@ -418,7 +418,7 @@ void IrcClient::process(const QString &message)
userMsg.remove(QRegularExpression("^.*"+channel+"\\s:"));
if (userMsg.startsWith('.')) {
- userMsg = "Blinded message";
+ userMsg = global::BLINDED_MESSAGE_MERKER;
}
else if (userMsg.startsWith("ACTION")) {
userMsg.remove("ACTION");