You can't ban someone from an unknown channel.
A private message isn't related directly to any channel.
You can *try* using $comchan() if you want, but that's fairly general.
Also, the '@' level modifier will *NOT* allow the event to trigger for a private message.
If you are protecting a single channel, then you can hard wire it.
If you want it to protect many or an unknown list of channels, learn how to use $comchan() and a /while loop.