mIRC Homepage
Posted By: Ravich on notice event - 17/07/06 09:27 PM
Hello I have one simple question smile
I wrote this but...there's something wrong with it smile Can you help me smile
Code:
 on*:notice:The nickname [test123] is not registered:*: { nick test123 | msg ns register trees flowers }


alias ravich {
/timer1 0 2 /.msg ns info test123 }   
Posted By: Kurdish_Assass1n Re: on notice event - 17/07/06 10:18 PM
can you please explain what's wrong with it, is it just not working?
Posted By: billythekid Re: on notice event - 17/07/06 11:24 PM
on*:notice:The nickname [test123] is not registered:*: { nick test123 | msg ns register trees flowers }

needs a space

on *:notice:The nickname [test123] is not registered:*: { nick test123 | msg ns register trees flowers }
Posted By: Kurdish_Assass1n Re: on notice event - 17/07/06 11:26 PM
wow Billy, good eyes, lol, didn't see it.
Posted By: billythekid Re: on notice event - 17/07/06 11:28 PM
i normally miss those things too, must be because the stoopid computer is laggeriffic tonight...

btk
Posted By: Ravich Re: on notice event - 18/07/06 08:45 AM
Well my idea is to check whether a nickname is registered and if it isn't to change my nickname and to register it. But the script doesn't work... frown
Posted By: billythekid Re: on notice event - 18/07/06 10:51 AM
Code:
 on *:notice:*:*:{ 
  if ( $nick == Nickserv ) && ( *is*n*t*registered* iswm $1- ) {
    if $network == PhaZeNet { 
      if $me != $gettok($1-,[color:red]2[/color],32) { 
        nick $v2 
      } 
    }
    elseif $network == DALnet { 
      if $me != $gettok($1-,[color:red]3[/color],32) { 
        nick $v2 
      } 
    }
    .msg ns register password email@myemail.com 
  }
}

alias ravich {
  timer1 1 2 .msg ns info $1 
} 


here i have the red bits to get the nick out of the notice, you will need this adjusted for each network you operate the script in.

PhaZeNet's Nickserve returns:
Nick boingerino isn't registered.

so the red number is 2 (the second word)

DALnet returns:
The nickname boingerino is not registered.

so the red number is 3 (the third word)

your original code looks like it uses the dalnet version.

usage, /ravich nick-you-are-checking i.e /ravich boingerino

btk
Posted By: billythekid Re: on notice event - 18/07/06 10:58 AM
Code:
 on *:notice:*:*:{ 
  if ( $nick == Nickserv ) && ( *is*n*t*registered* iswm $1- ) {
    if nick*isn't registered. iswm $1- { 
      if $me != $strip($gettok($1-,2,32)) { 
        nick $v2 
      } 
    }
    elseif The nickname*is not registered. iswm $1- { 
      if $me != $strip($gettok($1-,3,32)) { 
        nick $v2 
      } 
    }
  .msg nickserv register password email@myemail.com 
  }
} 

/alias ravich {
  timer1 1 2 msg nickserv info $1
}


changed that code so you dont need to afdd networks but instead add messages(if you find differences.

changed the msg ns to msg nickserv, and added $strip() as it was bold when returned...

btk
© mIRC Discussion Forums