this should fix the highlighting failz with non-lowercase player names like the one CheezeMonkey ran into. 0.9.17
authorsheepluva
Mon, 21 Nov 2011 21:23:23 +0100
branch0.9.17
changeset 6408 58d0195ec76e
parent 6405 715ce0211d93
child 6410 fd08e4052360
this should fix the highlighting failz with non-lowercase player names like the one CheezeMonkey ran into. there is a workaround: in the user dir put the playername in <playerNameWithCorrectCase>_highlight.txt
QTfrontend/ui/widget/chatwidget.cpp
--- a/QTfrontend/ui/widget/chatwidget.cpp	Mon Nov 21 11:00:42 2011 +0100
+++ b/QTfrontend/ui/widget/chatwidget.cpp	Mon Nov 21 21:23:23 2011 +0100
@@ -669,9 +669,9 @@
     QString hlRegExp("^(.* )?%1[^-a-z0-9_]*( .*)?$");
     QRegExp whitespace("\\s");
 
-    m_highlights.append(QRegExp(hlRegExp.arg(m_userNick)));
+    m_highlights.append(QRegExp(hlRegExp.arg(m_userNick.toLower())));
 
-    QFile file(cfgdir->absolutePath() + "/" + m_userNick + "_highlight.txt");
+    QFile file(cfgdir->absolutePath() + "/" + m_userNick.toLower() + "_highlight.txt");
 
     if (file.exists() && (file.open(QIODevice::ReadOnly | QIODevice::Text)))
     {
@@ -691,7 +691,7 @@
             file.close();
     }
 
-    QFile file2(cfgdir->absolutePath() + "/" + m_userNick + "_hlregexp.txt");
+    QFile file2(cfgdir->absolutePath() + "/" + m_userNick.toLower() + "_hlregexp.txt");
 
     if (file2.exists() && (file2.open(QIODevice::ReadOnly | QIODevice::Text)))
     {