Code:
on +owner:join:#: { 
    /reg 
    if (%ok = on) { 
    /mode $chan +qo $nick $nick 
   } 
} 
alias reg {  
  $+(/timerregcheck, $cid, $nick) 1 2 .notice $nick identify please.  
  .whois $nick 
  /timer 1 3 .disable #regcheck 
  .enable #regcheck 
} 
#regcheck off 
raw 307:*:{ 
  if ($level($2) = owner) {            
    set -u3 %ok on 
  } 
  elseif ($level($2) = sop) { 
    set -u3 %ok on 
  } 
  elseif ($level($2) = aop) { 
    set -u3 %ok on 
  } 
  elseif ($level($2) = hop) { 
    set -u3 %ok on 
  } 
  $+(/timerregcheck, $cid, $2) off    
  .disable #regcheck 
} 
#regcheck end  

ok now i have this but when the %ok on is seted the "on join" part can`t recognice it, help please, thanks.