For his script, he does need 2 }'s and 2 {'s. He's missing one { on the first line and the } you mentioned needs a space before it.
That said, you're right that there's no way to know if the person is an op without being in the channel. However, since you're doing this with specific ops in mind, just give those ops access levels and use that.
ON safeinvite:INVITE:#: {
join $chan
}
Then, in your Users List tab, enter the nicks/addresses like this:
safeinvite:nick1
safeinvite:nick2
safeinvite:nick3
or:
safeinvite:nick1!ident@host
safeinvite:nick2!ident@host
safeinvite:nick3!ident@host
You can use various masks for this, such as *!*@host if you want.