Type a sentence - any words not in the whitelist will be rejected as you type. (However you should type slowly, the hacked key block I'm using isn't fast enough to keep up with quick typing) You can add this mechanism to your chat servers if you need to add a whitelist... There are a few outstanding "To do's" which are documented in the source inside. The bulk of the code here is a very basic text editor. The actual prefix check code is quite short.
This uses Paddle2See's wordlist from https://scratch.mit.edu/projects/70179488/. It is a demo of a lookup method, not of the whitelist. The test type-in box doesn't scroll, so remember to press enter near the end of the line. Original project: ASCII Key Detector by griffpatch