What do you mean exactly? Do you want to set a password (+key) on a channel on disconnect? That will be hard when disconnected from a server. If you mean to autojoin the channel when the connection is back and don't want to type the already setted password (+key) everytime simply use:
Code:
on 1:CONNECT: {
  join #chan1 pass1
  join #chan2 pass2
}

And so on.