Two suggestions (the latter being more restrictive) - either should work for your request
; if ChanServ ops "unknown" on #yourchan and "unknown" also gets, or already has PROTECT: send DEPROTECT command
on *:op:#yourchan: {
if ($opnick == unknown) && ($nick == chanserv) && ($nick($chan,$opnick,&)) {
.msg chanserv deprotect $chan $opnick
}
}
; if on #yourchan ChanServ literally sets either "+oa unknown unknown" or "+ao unknown unknown": send DEPROTECT command
on *:rawmode:#yourchan: {
if ($istok(+ao.+oa,$1,46)) && ($2-3 == unknown unknown) && ($nick == chanserv) {
.msg chanserv deprotect $chan $2
}
}
I didn't cover the case of deprotecting unknown if
any protect on unknown is set by chanserv, as it would require more parsing in the "on rawmode" event (think of a fancy " +mvvoa-Rihb nick1 nick2 nick3 unknown nick2 a!b@* ") and may not be what you're after.