mIRC Homepage
Posted By: Cheech on nick events - 12/12/02 12:44 AM
i'm trying to work out a script to change my nick back when lag and server issues result in the password not reaching the nickserv but i cant get the on nick event to work ? can you trigger this event on yourself ? or do i need to look elsewhere ? any help greatly appreciated smile
Posted By: DarkStarX Re: on nick events - 12/12/02 01:49 AM
on *:NOTICE:*:*:{
if (($nick == Nickserv) && (!%ns)) { set %ns $true | msg nickserv identify <password> | timerns 1 10 unset %ns }

Regards,
Posted By: Cheech Re: on nick events - 12/12/02 04:11 AM
thats just going to id isnt it ? the problem i have is that the id lags to the server so it chnges my nick to guest before the id reaches i want to change my nick from guest back to my nick on 1nick if ( $me == guest ) change my nick
in 1 ?
thx .
Posted By: Othello Re: on nick events - 12/12/02 04:13 AM
Try this it works for me

on *:NICK: { if (( $newnick == $me ) && ( guest isin $newnick )) { /nick NICK | /msg Nickserv Identify PASSWORD } }

Posted By: Dana Re: on nick events - 12/12/02 04:15 AM
I'm not sure what network you go to, but on some networks (such as DALnet), changing back to your original nickname right after being guest'ed is not a good idea.

Since services is still lagged, it will not obtain your identify right away. It will still send an "enforcer" on your nickname which will cause a nick collide - you will be bumped off the network.

Dana
Posted By: Cobra Re: on nick events - 12/12/02 04:42 AM
the event will triger for the changing of your own nick yes.

an example code to do what u ask might look like this:

Code:
on *:NICK: {
  if (($nick == $me) &amp;&amp; (guest* iswm $newnick)) {
    .timer 2 1 nick $+($nick,$rand(0,9))
  }
}


this wil triger when your nick gets changed to guestSOMETHING

the timer is to avoid geting the fast nickchange error that some servers use. the $+() statment is doing nothing more than adding a random number the the back of your nick as odds are your old one is now in use by nickserv. .. feel free to change that to something else if u like

note that this code may not work if you have anouther on nick event in your script somewhere that could posibly be halting operation before this one is read.

Cobra^
Posted By: Cheech Re: on nick events - 13/12/02 02:31 AM
thx i think that should work i just set the timer to release the nick etc but ? wouldnt ya know hasn't happened since i put it in .. lol
Posted By: Cobra Re: on nick events - 13/12/02 08:43 PM
it will work

and yes u could release the nick .. but usualy in times of lag etc .. the server tends to be silent .. then respond to a huge chunk of things at once then silent again at times.. so the fewer commands you issue the beter .. else you start flooding off .. if your server is anything like the one i connect to anyways :P

Cobra^
© mIRC Discussion Forums