The event you're looking for is on text.
/help on text
The function you want is ban and kick. Considering that you're using it for twitch you'll have to know how to ban on twitch since it's not the same as mIRC unless you're patiently awaiting Froggie's
mTwitch Normalizer.
Then you need to figure out how to catch certain words in a string, best used is Regex which can be read about over here:
http://www.regular-expressions.info/ you can use regex in mIRC as an identifier: $regex() or in the actual on text event.