"closemsg <nick>" is an old (and now undocumentated, but valid) command.
It's the same as close -m <nick>
".ignore $comchan($nick,1)" sets an ignore to the channel name - I don't think that's the intended effect. As DJ_Sol suggested, debug your code by un-silenceing the ignore command (ignore instead of .ignore) and by echoing the processed raw line etc.
Edit: if you want to check if some nick is op in any common channel, you may use
this custom identifier