You could have used a while loop & store those swear words in a variable, text file, ini or a hash table. Have you tested your snippet? Some of your events will not work, an example is this one \"on *:1:TEXT:...\". Also the events you have can also be triggered in private & it would give you an error message since $chan has no value in pm.