mIRC Homepage
Posted By: Krayzee registered nick - 22/07/04 11:03 PM
ok what i want to do is to check to see if the nickname of the person that triggered the last event (eg on text) has been registered with nickserv.

if it has then i want to carry on with the event otherwise stop.

eg
Code:
on *:text:sometext*: {
  if ( $nick is registered ) {
    do something
  }
} 


ne1 know the best way of doing this???
Posted By: Venoman Re: registered nick - 22/07/04 11:12 PM
the only way you could is to /whois the nick, maybe set a var for that nick once you get the line that the nick is registered. that's usually raw 307. you could do like:
Code:
raw 307:*:{ set $+(%,identified,$2) true }


then you'd end up with a var like:
%identifiedVenoman true

then could do in your check:
Code:
if ($($+(%,identified,$nick),2) == true) {
  do something
}


if you're dealing with a lot of nicks, you'd need to /whois everyone on join (would that flood you off? maybe. so timers). In which case you'd get flooded with /whois responses, which means you need to change the raws for these (and maybe more, depending on the network you're on):
311,307,615,616,319,312,317,318

hope this helps.

-Venoman
© mIRC Discussion Forums