QTfrontend/newnetclient.cpp
changeset 2405 3b8607ac32c6
parent 2403 6c5d504af2ba
child 2442 228757f6c54d
--- a/QTfrontend/newnetclient.cpp	Sat Oct 03 12:35:24 2009 +0000
+++ b/QTfrontend/newnetclient.cpp	Sat Oct 03 12:38:56 2009 +0000
@@ -270,9 +270,9 @@
 			return;
 		}
 		if (netClientState == 2)
-			emit chatStringLobby(formatChatMsg(lst[1], lst[2]));
+			emit chatStringLobby(HWProto::formatChatMsg(lst[1], lst[2]));
 		else
-			emit chatStringFromNet(formatChatMsg(lst[1], lst[2]));
+			emit chatStringFromNet(HWProto::formatChatMsg(lst[1], lst[2]));
 		return;
 	}
 
@@ -593,7 +593,7 @@
 {
 	if(str != "") {
 		RawSendNet(QString("CHAT") + delimeter + str);
-		emit(chatStringFromMe(formatChatMsg(mynick, str)));
+		emit(chatStringFromMe(HWProto::formatChatMsg(mynick, str)));
 	}
 }
 
@@ -601,7 +601,7 @@
 {
 	if(str != "") {
 		RawSendNet(QString("CHAT") + delimeter + str);
-		emit(chatStringFromMeLobby(formatChatMsg(mynick, str)));
+		emit(chatStringFromMeLobby(HWProto::formatChatMsg(mynick, str)));
 	}
 }
 
@@ -631,14 +631,6 @@
 	RawSendNet(QString("ROUNDFINISHED"));
 }
 
-QString HWNewNet::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);
-}
-
 void HWNewNet::banPlayer(const QString & nick)
 {
 	RawSendNet(QString("BAN%1%2").arg(delimeter).arg(nick));