Code:
on *:invite:*: {
  if (%invitebot == on) { join $chan | set $+(%,invite,$chan) $nick | describe $chan greets $($+(%,invite,$chan),2) }
  elseif (%invitebot == off) { notice $nick Sorry, but invite is currently off. }
}

I always find using $+ for dynamic vars is less of a headache and easier to quickly type out.


$maybe