diff --git a/src/channel.cpp b/src/channel.cpp
index 4f9f0573..68f42d53 100755
--- a/src/channel.cpp
+++ b/src/channel.cpp
@@ -37,6 +37,15 @@ CChannelSet::CChannelSet() : bWriteStatusHTMLFile ( false )
vecChannels[i].SetIsServer ( true );
}
+ // define colors for chat window identifiers
+ vstrChatColors.Init ( 6 );
+ vstrChatColors[0] = "mediumblue";
+ vstrChatColors[1] = "red";
+ vstrChatColors[2] = "darkorchid";
+ vstrChatColors[3] = "green";
+ vstrChatColors[4] = "maroon";
+ vstrChatColors[5] = "coral";
+
// CODE TAG: MAX_NUM_CHANNELS_TAG
// make sure we have MAX_NUM_CHANNELS connections!!!
// send message
@@ -176,8 +185,10 @@ void CChannelSet::CreateAndSendChatTextForAllConChannels ( const int iCurChanID,
}
// add name of the client at the beginning of the message text
+ QString sCurColor = vstrChatColors[iCurChanID % vstrChatColors.Size()];
const QString strActualMessageText =
- "<" + ChanName + "> " + strChatText;
+ "<" + ChanName +
+ "> " + strChatText;
// send chat text to all connected clients ---------------------------------
diff --git a/src/channel.h b/src/channel.h
index d78682ec..a1f0ccb0 100755
--- a/src/channel.h
+++ b/src/channel.h
@@ -259,13 +259,15 @@ protected:
/* do not use the vector class since CChannel does not have appropriate
copy constructor/operator */
- CChannel vecChannels[MAX_NUM_CHANNELS];
- QMutex Mutex;
+ CChannel vecChannels[MAX_NUM_CHANNELS];
+ QMutex Mutex;
+
+ CVector vstrChatColors;
// HTML file server status
- bool bWriteStatusHTMLFile;
- QString strServerHTMLFileListName;
- QString strServerNameWithPort;
+ bool bWriteStatusHTMLFile;
+ QString strServerHTMLFileListName;
+ QString strServerNameWithPort;
public slots:
// CODE TAG: MAX_NUM_CHANNELS_TAG