banbuilder
banbuilder copied to clipboard
Request: return boolean if bad word is found
I would like to execute further actions if a bad word is found multiple times from the same user. How can I get a 1:0 if a string had a bad word or not?
+1
use Snipe\BanBuilder\CensorWords;
$censor = new CensorWords;
$yourstring = 'Go to hell, you b1tch!';
$result = $censor->censorString($yourstring);
$hasMatch = count($result['matched']) > 0
@koesie10 this will work?
@koesie10 this will work?
Yes, this still works.