You put the literal chans you want enabled in the first line: ON @*:TEXT:*:#chan1,#chan2: {

Conversely you can also provide the channels you want it disabled for inside of the functioin:

Code:
ON @*:TEXT:*:#: {
  if ($istok(#chan1 #chan2,$chan,32)) return