Yes it certainly doesn't need any halt at all. It also would fail if the channel had a key containg R (e.g. +k BuggeR) Better to use $gettok($chan($1).mode,1,32)