Code:
; chan is invite only: set a variable temporary (5seconds) to identify this chan. tell chanserv to invite you.
raw 473:*: { 
  set -eu5 $+(%,cs.invite.,$scid,.,$2) on
  msg chanserv invite $2
}

; you have been invited into (one of the) chans you wanted to join: join the chan (overriding setting at options-irc).
on *:invite:#: {
  if ($($+(%,cs.invite.,$scid,.,$chan))) { join $chan }
}

; you joined that a channel: unset the identifying variable immediately.
on me:*:join:#:{ 
  if ($($+(%,cs.invite.,$scid,.,$chan))) { unset $+(%,cs.invite.,$scid,.,$chan)) }
}

hope it works on your ircd, too smile