Offload colour replace to client

This commit is contained in:
Vortrex
2022-02-24 15:45:30 -06:00
parent e44307991d
commit 7daa692770
6 changed files with 1243 additions and 393 deletions

View File

@@ -46,11 +46,13 @@ function unBindChatBoxKeys() {
// ===========================================================================
function receiveChatBoxMessageFromServer(messageString, colour) {
if(bottomMessageIndex => chatBoxHistory.length-1) {
message(messageString, colour);
let colouredString = replaceColoursInMessage(messageString);
if(bottomMessageIndex >= chatBoxHistory.length-1) {
message(colouredString, colour);
bottomMessageIndex = chatBoxHistory.length-1;
}
addToChatBoxHistory(messageString, colour);
addToChatBoxHistory(colouredString, colour);
}
// ===========================================================================