hello

this script adds ops mask/ip/domain in the protect list in every channel I join

I want these entries to work only when I am in this channel, so how do I make those entries expire when I close mirc? or any other way?

Code:
on me:^&*:join:#: {
  .timer 1 3 checkregs #
}
alias checkregs {
  if (!$1) { return }
  var %loop = 1, %regs = $nick($1,0,a,r)
  while (%loop <= %regs) {
    protect $nick($1,%loop,a,r) 2
    inc %loop
  }
}


thanks !