You can specify an address (including wildcarded addresses) in the /ban command. Rather than using /mode #channel +b IP and then scanning the channel kicking them, try /ban -k #channel IP