Created
January 29, 2024 14:52
-
-
Save 0x24a/c84be71a2f5db9f02b464464dc4ecdaf to your computer and use it in GitHub Desktop.
HC++ Plugin: No-Single-Punctuation-Mark
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const punctuation_marks=Array.from(".,?!…,。?!") | |
function pmcheck(args){ | |
if(args[0].cmd!="chat"){return args}; | |
if((args[0].text.length == 1) || punctuation_marks.indexOf(args[0].text) != -1){ | |
pushMessage({nick:"!",text:"Single punctuation mark cannot be sent."}) | |
return false; | |
}else{ | |
return args | |
} | |
} | |
hook.register("in","send",pmcheck) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment