mirror of
https://gitgud.io/BondageProjects/Bondage-College.git
synced 2025-04-25 17:59:34 +00:00
BUG: Ensure that voice-triggered auto-punishments more thoroughly check for OOC blocks
This commit is contained in:
parent
318326c9c7
commit
fe350e50df
1 changed files with 5 additions and 4 deletions
|
@ -268,10 +268,11 @@ const PropertyAutoPunishKeywords = [
|
|||
* @returns {boolean} Whether the passed message should trigger automatic speech-based punishment
|
||||
*/
|
||||
function PropertyAutoPunishParseMessage(Sensitivity, msg) {
|
||||
// Conditions which are never punishable
|
||||
if (msg.startsWith("(")) {
|
||||
return false;
|
||||
}
|
||||
// Remove the OOC component(s) from the message, as those are never punishable
|
||||
const oocRanges = SpeechGetOOCRanges(msg).reverse();
|
||||
const arrayMsg = Array.from(msg);
|
||||
oocRanges.forEach(({ start, length }) => arrayMsg.splice(start, length));
|
||||
msg = arrayMsg.join("");
|
||||
|
||||
// Conditions that are always punishable
|
||||
const PunishableSpeech = (
|
||||
|
|
Loading…
Add table
Reference in a new issue