This is what I am using but it does not work

on *:JOIN:#channel: {
if ($me isop $chan) {!mode $chan +v $nick}
if (Guest_* iswm $nick) {!mode $chan -v $nick}
}

I replace channel etc with the correct names in the actual remote.

The above version was my last attempt which was to autovoice everyone and then devoice guests even this icky idea didn't work.

Is this possible?