why not using auto limit??
something like this E.G
on *:join:#:timerlimit 1 5 mode # +l $calc($nick(#,0) +2)
on *:part:#:{
inc -u2 %fld
if %fld >= 7 {
mode # +i
timeri 1 4 mode # -i
}
timerlimit 1 5 mode # +l $calc($nick(#,0) +2)
}
in this case if two users join the channel the third can not join that after 5 sec and if more than 7 leave this will execute mode +i bcz of limit isnt +2 yet
this is just an EG so i dont have mIRC here (not tested)
but u can have an idea