you use /mode #cm7ex several, which while cause an error if that channel doesn't exist it should simply always be /mode $chan