mIRC Home    About    Download    Register    News    Help

Print Thread
How do I automate Nickserv Identify <password>? #228847 12/01/11 09:29 AM
Joined: Jan 2011
Posts: 22
D
drumtrucker Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Jan 2011
Posts: 22
Can I automate the /msg nickserv identify <pw> needed when I enter a channel that wants that?

Re: How do I automate Nickserv Identify <password>? [Re: drumtrucker] #228848 12/01/11 09:49 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
on me:*:JOIN:#mychan:msg nickserv identify PW


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: How do I automate Nickserv Identify <password>? [Re: argv0] #228866 12/01/11 11:03 PM
Joined: Jan 2011
Posts: 22
D
drumtrucker Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Jan 2011
Posts: 22
where do i put that command?

Re: How do I automate Nickserv Identify <password>? [Re: drumtrucker] #228868 13/01/11 12:31 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
That goes into your Remotes (Alt + R)

Please note that most networks ask/require the information when you connect rather than when you join a specific channel. Also the code given would send the same password no matter what network you were on.

Personally, I use the following (with the specific details hidden)
Code:
on *:notice:*nick* is registered*:*:{
  if ($istok(network1 network2 network3,$network,32) && ($nick == nickserv) {        .msg $v2 identify <password>     }
}

Note that this does require you to use the same password on each network. If you use different passwords on each network then the code would have to be changed.

Replace network1 network2 network3 with the appropriate network names and <password> with the appropriate password.

Re: How do I automate Nickserv Identify <password>? [Re: RusselB] #228872 13/01/11 02:37 AM
Joined: Jan 2011
Posts: 22
D
drumtrucker Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Jan 2011
Posts: 22
russel, thx

is the space in front of '.msg ' necessary?

ALSO; are network and server the same thing?


Re: How do I automate Nickserv Identify <password>? [Re: drumtrucker] #228874 13/01/11 03:37 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
That big a space isn't necessary, but there does have to be a bit of space, usually 2 presses of the space bar is sufficient. Also note that the spaces are needed both between the { and the .msg as well as at the end of the line before the }
Alternatively, you could just put the .msg line on a separate line.

As to network and server, sometimes they are the same, sometimes they are not.
Bigger networks will have multiple servers that people can connect to.

One network I'm on is Xeromem, thus //echo -a $network returns Xeromem
However, //echo -a $server could return any of these:
DeathStar.XeroMem.Com
Structure.XeroMem.Com
Mysfyt.Waysted-Youth.Net
Astaroth.ESyLumIRC.com
Hell.ESyLumIRC.com
Insanity.Vapors.Net

These are all servers that are connected to the Xeromem network.

Re: How do I automate Nickserv Identify <password>? [Re: RusselB] #228875 13/01/11 04:26 AM
Joined: Jan 2011
Posts: 22
D
drumtrucker Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Jan 2011
Posts: 22
egads!

DroidLife is a 'server' I added to server list.

I put this in Remote:

;on *:notice:*nick* is registered*:*:{
if ($istok(network1 network2 network3,$network,32) && ($nick == nickserv) { .msg $v2 identify <password> }

on *:notice:*nick* is registered*:*:{
if ($istok(DroidLife) && ($nick == nickserv) { .msg $v2 identify xxxx }

when I entered server next time, it did NOT ask me to IDENTIFY, so maybe it worked?


Re: How do I automate Nickserv Identify <password>? [Re: drumtrucker] #228878 13/01/11 08:00 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
If it didn't ask you to identify then it probably did work.
However, please note that if it did it was a bit of a fluke as this line
Code:
if ($istok(DroidLife) && ($nick == nickserv) { .msg $v2 identify xxxx }
is misconfigured.
It should look like
Code:
if ($istok(DroidLife,$network,32) && ($nick == nickserv)) { .msg $v2 identify xxxx }


If you only deal with one network, then you could replace $istok(DroidLife,$network,32) with ($network == DroidLife)

Re: How do I automate Nickserv Identify <password>? [Re: RusselB] #228883 13/01/11 04:36 PM
Joined: Jan 2011
Posts: 22
D
drumtrucker Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Jan 2011
Posts: 22
Ok, I see the difference, will comment my 'active line of code and see if I get asked to ident.


Re: How do I automate Nickserv Identify <password>? [Re: drumtrucker] #228885 13/01/11 07:14 PM
Joined: Jan 2011
Posts: 22
D
drumtrucker Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Jan 2011
Posts: 22
this:
on *:notice:*nick* is registered*:*:{
if ($network == DroidLife) && ($nick == nickserv) { .msg $v2 identify password}

yielded:
-NickServ- You are now identified for drumtrucker

THANKS AGAIN!

Re: How do I automate Nickserv Identify <password>? [Re: RusselB] #268775 26/04/21 09:14 PM
Joined: Apr 2021
Posts: 1
R
rebroad Offline
Mostly harmless
Offline
Mostly harmless
R
Joined: Apr 2021
Posts: 1
how do I do this if my password contains the $ symbol please?

Re: How do I automate Nickserv Identify <password>? [Re: rebroad] #268779 27/04/21 11:52 AM
Joined: Jan 2012
Posts: 113
Epic Online
Vogon poet
Online
Vogon poet
Joined: Jan 2012
Posts: 113
I do not see any obstacles for this. The password may be sent and received using any symbols, available in the encoding used by your network, services and the client.

For example:
Code
on *:NOTICE:*nick* is registered*:*:{
  if (YourNetwork isin $network && $nick == NickServ) { 
    .msg NickServ IDENTIFY pass$word
  }
}


But nevertheless, if in some way there are obstacles for this, then you can try using a temporary variable "%my_pass" to save there the password, where this the symbol will be: $ = $chr(36)

In the script code it will look like this:
Code
on *:NOTICE:*nick* is registered*:*:{
  if (YourNetwork isin $network && $nick == NickServ) { 
    var %my_pass = $+(pass,$chr(36),word)
    .msg NickServ IDENTIFY %my_pass
  }
}


Don't forget to change "YourNetwork" to the name of your network. Try this method, perhaps this will help you solve your problem.

P.S. I tested this even using as a password Japanese characters in unicode.



πŸ…ΈπŸ†πŸ…² - 𝔦'𝔱𝔰 𝔸 π•‚π–ŽΙ΄π™™ ᴏ𝙛 π•„π™–π–Œπ™žπ™˜
Re: How do I automate Nickserv Identify <password>? [Re: Epic] #268781 27/04/21 01:59 PM
Joined: Jan 2004
Posts: 1,558
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,558
Also, Epic's method works fine even if the password begins with the $ or % character:

//echo -a $+($,version) and $+(%,variable)

You could also use $eval to prevent a password being evaluated: //echo -a $eval( $passwordstring ,0)

And, while it is true that you have your password be given to nickserv while connecting to the server, by including it in the serverlist entry, I have encountered networks in the past where services frequently died and restarted, where they immediately demanded everyone's password again, forcing everyone into a guestnick if they didn't send their password again.