QTfrontend/chatwidget.cpp
changeset 2396 e13a1117152b
parent 2380 603965eca22b
child 2428 6800f8aa0184
--- a/QTfrontend/chatwidget.cpp	Sat Sep 26 20:54:13 2009 +0000
+++ b/QTfrontend/chatwidget.cpp	Sun Sep 27 10:26:36 2009 +0000
@@ -78,9 +78,12 @@
 	if (chatStrings.size() > 250)
 		chatStrings.removeFirst();
 
-	QString formattedStr = Qt::escape(str);
-	if (formattedStr.startsWith("["))
+	QString formattedStr = Qt::escape(str.mid(1));
+	if (str.startsWith("\x03"))
 		formattedStr = QString("<font color=grey>%1</font>").arg(formattedStr);
+	else if (str.startsWith("\x02"))
+		formattedStr = QString("<font color=magenta>%1</font>").arg(formattedStr);
+
 
 	chatStrings.append(formattedStr);