Module to disable modes based on connect classes

Adds disablecmodes and disableumodes options to connect classes, to allow disabling modes based on this.