join channels after u have identified for your registered nick just incase u have access on the channels you are joining to have u gaining access automated.
this kick bans users that send u PM right after u join a channel ( within 2 seconds line 1 in the code ) and obviously u need to be opped on the channels
This will check for bad channel on join and set ban on all channels you have access like: chanOP
this saves u the trouble if they join on another of ur channels to start all over again
Most modern updated IRCD's have all kinds of features to prevent mass joins some dont tho and those that have usually only lock channel if mass joins detected not removing mass joiners therefor this code might be some sort of solution for that part