QTfrontend/ui/widget/chatwidget.cpp
changeset 6221 f3ac3e51418b
parent 6218 999215ca87d7
child 6222 96d10dcd6d84
equal deleted inserted replaced
6220:39782c4d9246 6221:f3ac3e51418b
   477     formattedStr = formattedStr.replace(URLREGEXP, "<a href=\"http://\\3\">\\3</a>");
   477     formattedStr = formattedStr.replace(URLREGEXP, "<a href=\"http://\\3\">\\3</a>");
   478 
   478 
   479     // "link" nick, but before that encode it in base64 to make sure it can't intefere with html/url syntax
   479     // "link" nick, but before that encode it in base64 to make sure it can't intefere with html/url syntax
   480     // the nick is put as querystring as putting it as host would convert it to it's lower case variant
   480     // the nick is put as querystring as putting it as host would convert it to it's lower case variant
   481     if(!nick.isEmpty())
   481     if(!nick.isEmpty())
   482         formattedStr.replace("|nick|",QString("<a href=\"hwnick://?%1\" class=\"nick\">%2</a>").arg(QString(nick.toUtf8().toBase64())).arg(nick));
   482     {
       
   483         if (nick != m_userNick)
       
   484             formattedStr.replace("|nick|",QString("<a href=\"hwnick://?%1\" class=\"nick\">%2</a>").arg(QString(nick.toUtf8().toBase64())).arg(nick));
       
   485         else
       
   486             formattedStr.replace("|nick|", QString("<span class=\"nick\">%1</span>").arg(nick));
       
   487     }
   483 
   488 
   484     QString cssClass("msg_UserChat");
   489     QString cssClass("msg_UserChat");
   485 
   490 
   486     // check first character for color code and set color properly
   491     // check first character for color code and set color properly
   487     char c = str[0].toAscii();
   492     char c = str[0].toAscii();