mIRC Homepage
Posted By: starpossen If guest is in nick - 24/05/11 01:10 PM
Hi.

How would you go about changing nick from Guest to normal nick automaticly?
Posted By: Horstl Re: If guest is in nick - 24/05/11 01:46 PM
(untested)
Code:
; check your nickname on connect and as it changes
on me:*:nick: { noguestnick $newnick }
on *:connect: { noguestnick $me }

alias -l noguestnick {
; nickname starts with "Guest", no auto-nickchange-marker set for this connection
  if ((Guest* iswm $1) && (!$hget(noguestnick,$cid))) {

  ; change nick to main nickname (if not matching Guest*), else to alternative nickname (if not matching Guest*), else to FALLBACKNICKNAME
    nick $iif((Guest* !iswm $mnick),$v2,$iif((Guest* !iswm $anick),$v2, FALLBACKNICKNAME ))

    ; set auto-nickchange-marker for this connection for 90s - to prevent a "nickspam loop" (circular quarrelling with services or the like)
    if ($event != connect) { hadd -mu90 noguestnick $cid x }
  }
}

Posted By: starpossen Re: If guest is in nick - 24/05/11 02:59 PM
Thanks for the quick reply, so FALLBACKNICKNAME would be the part I change to my normal nick in the script?
Posted By: Horstl Re: If guest is in nick - 24/05/11 03:27 PM
The script tries to use your normal nicknames in the first place, that is your "main nickname" and "alternate nickname", as set in the mIRC options dialogue or with mIRC commands.
I added FALLBACKNICKNAME just for the (unlikely) case both normal nicknames match "Guest*" (for whatever reason), so you can put a hardcoded nickname there. smile
Posted By: starpossen Re: If guest is in nick - 24/05/11 04:33 PM
I see, thanks for explaining, I will test it later, thanks again.
© mIRC Discussion Forums