09-01-2016, 02:00 PM
You're absolutely right, this is an issue that could probably be solved within 15 minutes, together with removal of the "nocaps" setting.
It does take some time to figure out a good heuristic for filtering capitals. One-word messages such as "LMAO" are fine. Two-word sentences such as "OMG ROFL" are fine. Three-word sentences such as "WTFFFFFFF CAKE OMGGGG" are not fine. Sentences such as "I write PHP, JS and COBOL" are fine, other use of caps likely isn't.
If we were to implement this in JavaScript, we could have a JSON file with whitelisted capital-only words and recapitalise sentences with a certain lower/uppercase ratio entirely. That'd be effective, maintainable, testable and performant. It does require moving main chat to JavaScript.
It does take some time to figure out a good heuristic for filtering capitals. One-word messages such as "LMAO" are fine. Two-word sentences such as "OMG ROFL" are fine. Three-word sentences such as "WTFFFFFFF CAKE OMGGGG" are not fine. Sentences such as "I write PHP, JS and COBOL" are fine, other use of caps likely isn't.
If we were to implement this in JavaScript, we could have a JSON file with whitelisted capital-only words and recapitalise sentences with a certain lower/uppercase ratio entirely. That'd be effective, maintainable, testable and performant. It does require moving main chat to JavaScript.