I have a bot script, I want it to control more than 1 chan, atm, I can only set 1 chan as "controlchannel"

how can I modify this script, to accomodate multiple chans, when bot is in these chans

on master:text:!setchan*:$chan: if ($2 ischan) { set %controlchan $2 }

any help would be greatly appreciated

Thanks in advance confused