changeset 2405 | 3b8607ac32c6 |
parent 1485 | 51c11e77408a |
child 2948 | 3f21a9dc93d0 |
--- a/QTfrontend/proto.cpp Sat Oct 03 12:35:24 2009 +0000 +++ b/QTfrontend/proto.cpp Sat Oct 03 12:38:56 2009 +0000 @@ -39,3 +39,11 @@ addStringToBuffer(buf, strList[i]); return buf; } + +QString HWProto::formatChatMsg(const QString & nick, const QString & msg) +{ + if(msg.left(4) == "/me ") + return QString("\x02* %1 %2").arg(nick).arg(msg.mid(4)); + else + return QString("\x01%1: %2").arg(nick).arg(msg); +}