The $iil is not filled on invite, it's a set of masks for this chan and managed with chanmode I (to override chanmode i for all matching users - it works analogue to the banlist and mode b). This implies you also have to make sure your iil is up to date (like a "/mode # +b"-request to fill one's $ibl).
Something like:
Code:
on @*:join:#:{
  if ($chan($chan).iil == $true) {
    var %a = 1
    while ($iil($chan,%a)) {
      if ($v1 iswm $fulladdress) {
        .mode $chan +v $nick
        break
      }
      else { inc %a }
    }
  }
  ; else issue a /mode $chan +I
  ; and maybe haltdef the raw-replies; and maybe add a flood protection in case you're on many channels...
  ; - alike to the infamous mass-who scripts to have a up-to-date $ial
}

If you want to voice *all* invited users (maybe the userlevel required to issue invites had been limited in chanserv to prevent abuse), you have to capture and store the invites itself (you should get a notice about the invite - e.g. a small hash table containing $cid, $chan and $nick of invited users), then use this dataset to check all the joining users.

Last edited by Horstl; 01/02/10 11:36 AM.