if ($numtok(%nochannels,32) > 15) {
Why not just use
if ($numtok($3-,32) > 15) {
You\'d eliminate two lines (setting/unsetting variable) by doing that. Also, you can try $comchan :)