No because $chan doesn't work in Raw events, you're better off using $level or adding the nicknames in a hash table and having something like:

Code:
raw 319:*:{
  if (%drone != off) && (%options.exempt != on) && ($nick(#chat,$me,~&@%)) {
    if $numtok($3-,32) > 12 {
      if ($wildtok($3-,#*,$numtok($3-,32),32)) && (!$hget(exempt,$2)) ban -ku3600 #chat $2 2 14Drone Bot - Excess Channels
    }
  }
}