on me:*:join:#:.timeroc 1 5 oc
alias -l oc {
var %x = $chan(0)
while (%x) {
if ($me !isop $chan(%x)) {
part $chan(%x)
}
dec %x
}
}
This goes into your bot remote. Upon its joining, a delay timer of 5 secs will set out to check if the bot is opped or not. If not, part the channel(s).