QTfrontend/newnetclient.cpp
changeset 2396 e13a1117152b
parent 2377 f3fab2b09e0c
child 2403 6c5d504af2ba
--- a/QTfrontend/newnetclient.cpp	Sat Sep 26 20:54:13 2009 +0000
+++ b/QTfrontend/newnetclient.cpp	Sun Sep 27 10:26:36 2009 +0000
@@ -375,7 +375,7 @@
 					emit configAsked();
 			}
 			emit nickAdded(lst[i]);
-			emit chatStringFromNet(QString(tr("[ %1 has joined the room ]")).arg(lst[i]));
+			emit chatStringFromNet(tr("%1 *** %2 has joined the room").arg('\x03').arg(lst[i]));
 		}
 		return;
 	}
@@ -397,7 +397,7 @@
 			}
 
 			emit nickAddedLobby(lst[i]);
-			emit chatStringLobby(QString(tr("[ %1 has joined ]")).arg(lst[i]));
+			emit chatStringLobby(tr("%1 *** %2 has joined").arg('\x03').arg(lst[i]));
 		}
 		return;
 	}
@@ -410,9 +410,9 @@
 		}
 		emit nickRemoved(lst[1]);
 		if (lst.size() < 3)
-			emit chatStringFromNet(QString(tr("[ %1 has left ]")).arg(lst[1]));
+			emit chatStringFromNet(tr("%1 *** %2 has left ]").arg('\x03').arg(lst[1]));
 		else
-			emit chatStringFromNet(QString(tr("[ %1 has left (%2) ]")).arg(lst[1], lst[2]));
+			emit chatStringFromNet(tr("%1 *** %2 has left (%3) ]").arg('\x03').arg(lst[1], lst[2]));
 		return;
 	}
 
@@ -434,9 +434,9 @@
 		}
 		emit nickRemovedLobby(lst[1]);
 		if (lst.size() < 3)
-			emit chatStringLobby(QString(tr("[ %1 has left ]")).arg(lst[1]));
+			emit chatStringLobby(tr("%1 *** %2 has left ]").arg('\x03').arg(lst[1]));
 		else
-			emit chatStringLobby(QString(tr("[ %1 has left (%2) ]")).arg(lst[1], lst[2]));
+			emit chatStringLobby(tr("%1 *** %2 has left (%3) ]").arg('\x03').arg(lst[1], lst[2]));
 		return;
 	}
 
@@ -629,9 +629,9 @@
 QString HWNewNet::formatChatMsg(const QString & nick, const QString & msg)
 {
 	if(msg.left(4) == "/me ")
-		return QString("* %1 %2").arg(nick).arg(msg.mid(4));
+		return QString("\x02* %1 %2").arg(nick).arg(msg.mid(4));
 	else
-		return QString("%1: %2").arg(nick).arg(msg);
+		return QString("\x01%1: %2").arg(nick).arg(msg);
 }
 
 void HWNewNet::banPlayer(const QString & nick)