You could do that with only one script
raw 473:*:{
  .timer 1 2 msg $safe($2) invite $me $iif($2 == #channel_1,key1,$iif($2 = #channel_2,key2))
alias safe return $!decode( $encode($1,m) ,m)

$2 contains the name of the channel that the invite command has to be received from, $me is your nick

Replace #channel_1, key1, #channel_2, and key2 with the appropriate information

Edit: Fixed insecure code

Last edited by qwerty; 24/07/08 08:25 AM.