bad word script (regex) - 26/05/07 05:45 AM
I used the search button on this forum and I understood that I need to use regular expressions for the following code:
The problem is that the script does not read only the bad word in a sentence, but also other words that contain the bad word...
example: XYZbadWord1 - should not trigger the script
Also is it possible the read the bad words from a .txt ?
I would apreciate the help. Thanks.
Code:
on @*:TEXT:*:#chanName:{ IF ($nick isop #) { RETURN } VAR %s = $strip($1-) IF ((*BadWord1* iswm %s) || (*BadWord2* iswm %s) || (*BadWord3* iswm %s) || (*BadWord4* iswm %s)) { SET -u3600 %rl. [ $+ [ $address($nick,2) ] ] $calc( %rl. [ $+ [ $address($nick,2) ] ] + 1)
The problem is that the script does not read only the bad word in a sentence, but also other words that contain the bad word...
example: XYZbadWord1 - should not trigger the script
Also is it possible the read the bad words from a .txt ?
I would apreciate the help. Thanks.