mIRC Home    About    Download    Register    News    Help

Print Thread
#232219 24/05/11 01:10 PM
Joined: Oct 2005
Posts: 98
S
Babel fish
OP Offline
Babel fish
S
Joined: Oct 2005
Posts: 98
Hi.

How would you go about changing nick from Guest to normal nick automaticly?

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
(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 }
  }
}


Last edited by Horstl; 24/05/11 02:00 PM.
Joined: Oct 2005
Posts: 98
S
Babel fish
OP Offline
Babel fish
S
Joined: Oct 2005
Posts: 98
Thanks for the quick reply, so FALLBACKNICKNAME would be the part I change to my normal nick in the script?

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
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

Joined: Oct 2005
Posts: 98
S
Babel fish
OP Offline
Babel fish
S
Joined: Oct 2005
Posts: 98
I see, thanks for explaining, I will test it later, thanks again.


Link Copied to Clipboard