mIRC Homepage
Posted By: Newinthis Need to check if an user is identified - 10/06/05 07:42 PM
Hi everybody,
i need a code to check "on join" if users are identified, if they are, then they can use the levels I gave them, if not, it will trigger a notice reminding them to identify with nickserv. I think then i could use the level users by nick, cause masks allways rotate and when they join, my bot can´t identify them. Another problem I think, when I give levels by nick, if they change it to another grouped nick, my bot can`t recognise them anymore...well enough hehe

Thanks in advance :¬)
Posted By: tidy_trax Re: Need to check if an user is identified - 10/06/05 07:52 PM
Try this.

Code:
on @*:join:#:{
  $+(.timerregcheck, $cid, $nick) 1 2 .notice $nick Please identify to your nick!
  whois $nick
  .timer 1 3 .disable #regcheck
  .enable #regcheck
}

#regcheck off
raw 307:*:{
  <commands to add registered users to your list, where $2 is the nickname>
  $+(.timerregcheck, $cid, $2) off
  .disable #regcheck
}
#regcheck end
Posted By: Newinthis Re: Need to check if an user is identified - 10/06/05 08:38 PM
GREAT!!! thank`s man, so quickly so perfect, thanks very much : )
if i have any problem I´ll tell you : )
Posted By: tidy_trax Re: Need to check if an user is identified - 10/06/05 08:40 PM
No problem smile
Posted By: Newinthis Re: Need to check if an user is identified - 10/06/05 09:45 PM
Have to bother you again : P
The script works perfect but is there any identifier for main nicks? when i add an user with /guser <level> $nick 2 (Host&adress) user`s ip rotates and when he joins he is not recogniced in bot´s levels, so i think, let´s add only nick - /guser <level> $nick 8, but if user changes to another of his grouped registered nicks, bot can´t recognise him again...so is there any solution for nick changes to be recogniced by bot?
that´s all thanks again... : )
Posted By: tidy_trax Re: Need to check if an user is identified - 10/06/05 09:56 PM
You could just add all of his nicks to the userlist with the on nick event;

Code:
on *:nick:{
  if ($nick == %nick) { 
    set %nick $newnick
    guser &lt;level&gt; $newnick 8
  }
}


Then just type /set %nick <his current nick> and it should work.
Posted By: Newinthis Re: Need to check if an user is identified - 10/06/05 10:42 PM
Not a bad idea, simple, quite effective but I`m searching for a command to find out grouped nicks in user so then i can set a variable for the "on join" code: ?comand { if nick 1 nick 2 nick 3, etc == (main nick added in levels), do this..

Thanks : )
Posted By: tidy_trax Re: Need to check if an user is identified - 10/06/05 10:52 PM
I don't understand what you mean, could you try rephrasing please?
Posted By: xMIRCd Re: Need to check if an user is identified - 10/06/05 10:54 PM
Send me your script at inaki@painsoftproductions.com and i'll take a look at what I can do. It depends whether you are using an old type ini user system or a new type hash system.
Posted By: Newinthis Re: Need to check if an user is identified - 10/06/05 11:05 PM
sure :
when someone joins with a op level in my lists trigger the script you gave me first that´s ok, but if the same user change his nick i need something to recognice him again, so I can use your code there but It would be nice to find the way to search user nick for his other identified nicks (group) so then if he changes his nick to other identified one, my bot can recognice him again it will be more efficient that way.
Another thing I can do is, on nick change ask for an identification to group his nick in my list so then when he joins again he will be recogniced cause he is identified in nickserv and my bot detects that, and recogniced in my bot list... a little messy but well 1st my english suxs and 2nd have many ideas but Im on my first step in this... thanks again : )
Posted By: Newinthis Re: Need to check if an user is identified - 13/06/05 01:31 AM
Code:
 on *:join:#:{
  $+(.timerregcheck, $cid, $nick) 1 2 .notice $nick please identify!
  whois $nick
  .timer 1 3 .disable #regcheck
  .enable #regcheck
}
#regcheck off
raw 307:*:{
  if ($level($2) == owner) {
    /guser op $2 9 
  }
  if ($level($2) == sop) {
    /guser sop $2 9 
  }
  if ($level($2) == op) {
    /guser op $2 9 
  }
  if ($level($2) == hop) {
    /guser hop $2 9 
  }
  if ($level($2) == vop) {
    /guser vop $2 9 
  }
  if ($level($2) == black) {
    /guser black $2 9 
  }
  $+(.timerregcheck, $cid, $2) off
  .disable #regcheck
}
#regcheck end
on 100:nick:{ 
  /reg2
;this in aliases
/reg2 {
 $+(.timerregcheck, $cid, $newnick) 1 2 .notice $newnick please identify!
  .whois $newnick
  .timer 1 3 .disable #regcheck
  .enable #regcheck
}

please help smirk
Posted By: Newinthis Re: Need to check if an user is identified - 13/06/05 01:33 AM
Quote:
on 100:nick:{

is
Code:
 on *:nick:  
Posted By: Newinthis Re: Need to check if an user is identified - 16/06/05 04:49 PM
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.
Posted By: xMIRCd Re: Need to check if an user is identified - 26/06/05 11:40 PM
on OWNER LEVEL :join:#: reg | if (%ok = on) mode $chan +qo $nick $nick
alias reg {
$+(timerregcheck, $cid, $nick) 1 2 .notice $nick identify please.
.whois $nick
.enable #regcheck
}
#regcheck off
raw 307:*:{
if ($level($2) = OWNER LEVEL ) set -u3 %ok on
elseif ($level($2) = SOP LEVEL ) set -u3 %ok on
elseif ($level($2) = AOP LEVEL ) set -u3 %ok on
elseif ($level($2) = HOP LEVEL ) set -u3 %ok on
$+(timerregcheck, $cid, $2) off
.disable #regcheck
}
#regcheck end
© mIRC Discussion Forums