Good job. But what's with the || and :END? They're completely purposeless. Also, you need to put a check for the !plist trigger event:
on *:text:!plist:#: {
if (%purges) { ...
This way, you don't get an "empty" result if the variable is not set.
And Last but not least, It's a wise choice to ban offenders' hosts, not their nicknames. e.g.
ban -k # $nick 2