-
+
+
+ 0
+ 0
+
+
&Send
diff --git a/src/server.cpp b/src/server.cpp
index 21fe46f0b2..3411290e64 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -1411,8 +1411,18 @@ void CServer::CreateAndSendChatTextForAllConChannels ( const int iCurChanID, con
// use different colors
QString sCurColor = vstrChatColors[iCurChanID % vstrChatColors.Size()];
- const QString strActualMessageText = "(" + QTime::currentTime().toString ( "hh:mm:ss AP" ) + ") " +
- ChanName.toHtmlEscaped() + " " + strChatText.toHtmlEscaped();
+ QString strActualMessageText =
+ "(" + QTime::currentTime().toString ( "hh:mm:ss AP" ) + ") " + ChanName.toHtmlEscaped() + " ";
+
+ if ( strChatText.contains ( "\n" ) )
+ {
+ // add 'preformatted' tags around multiline strings
+ strActualMessageText += "
" + strChatText.toHtmlEscaped() + "
";
+ }
+ else
+ {
+ strActualMessageText += strChatText.toHtmlEscaped();
+ }
// Send chat text to all connected clients ---------------------------------
for ( int i = 0; i < iMaxNumChannels; i++ )