Colorize join/quit messages
authorunc0rr
Fri, 09 Jan 2009 17:27:13 +0000
changeset 1626 58fd5bc49a04
parent 1625 37aae47943ce
child 1627 efcf6e976869
Colorize join/quit messages
QTfrontend/chatwidget.cpp
--- a/QTfrontend/chatwidget.cpp	Fri Jan 09 14:47:54 2009 +0000
+++ b/QTfrontend/chatwidget.cpp	Fri Jan 09 17:27:13 2009 +0000
@@ -75,8 +75,12 @@
 {
 	if (chatStrings.size() > 250)
 		chatStrings.removeFirst();
+
+	QString formattedStr = Qt::escape(str);
+	if (formattedStr.startsWith("***"))
+		formattedStr = QString("<font color=grey>%1</font>").arg(formattedStr);
 	
-	chatStrings.append(Qt::escape(str));
+	chatStrings.append(formattedStr);
 	
 	chatText->setHtml(chatStrings.join("<br>"));