Well, seems like you need to define the rules that you want the script to check for, and then see if it's possible to be checked.. e.g bad words, flood, join/part flood.
And then apply the counting variables to each case.