mIRC Homepage
Posted By: apc0243 Automatic nick login script - 04/12/05 09:00 PM
I was wondering if it would be possible to create a script that would check to see that when you put in your nick to be (whatever you want) that it would log you in automaticly. Like you set the password and enter the name for it.

lEX: If { nick(Thegreatsocrates) /msg nickserv login *password*} or something.

Thanks guys.
Posted By: RusselB Re: Automatic nick login script - 04/12/05 09:10 PM
Considering I've never seen a login option for nickserv, unless this is an option that is for IRCops only, you're going to have to clarify just what it is you want.
If this is something for IRCops, and you are an IRCop, then you'll have to supply the proper format for the login.

Most people, when referring to nickserv, are looking at the identify command, in which case the following will automatically identify you to nickserv when you connect.
Code:
on *:connect:{
.msg nickserv identify <password>
}
  

Replace <password> with your actual password
Posted By: schaefer31 Re: Automatic nick login script - 04/12/05 09:12 PM
Code:
on me:*:nick:{
  if ($newnick == Thegreatsocrates) {
    [color:red]Command to execute[/color]
  }
}


This triggers when you change your nick to 'Thegreatsocrates'
Posted By: apc0243 Re: Automatic nick login script - 04/12/05 09:26 PM
Thank you guys. I used both of them and they worked. Yes, I meant identify (I couldn't remember the word for it :tongue:) Thanks again!
Posted By: CtrlAltDel Re: Automatic nick login script - 04/12/05 11:10 PM
actually, with nickserv going on netsplits and coming back asking you to identify, you might try this instead:
Code:
on *:notice:This nickname is owned by someone else.*:*: {
  if ($nick != NickServ) { return }
 .msg nickserv identify &lt;password&gt;
}

on *:notice:This nickname is registered and protected*:*: {
  if ($nick != NickServ) { return }
 .msg nickserv identify &lt;password&gt;
}
 


These two cover the two different nickservs I've encountered.
Posted By: RusselB Re: Automatic nick login script - 04/12/05 11:33 PM
Good idea..only thing I would suggest is changing the events from NOTICE to SNOTICE
Posted By: CtrlAltDel Re: Automatic nick login script - 05/12/05 01:29 AM
except they're not server notices, but notices from a nickname (nickserv)

[edit] and they work perfectly on the 2 networks I frequent [/edit]
Posted By: RusselB Re: Automatic nick login script - 05/12/05 02:02 AM
Interesting, since I use something similar for my bot, which is on 4 networks, and they get recognized as snotices..fluke? who knows?
Posted By: CtrlAltDel Re: Automatic nick login script - 05/12/05 03:23 PM
Maybe making it redundant enough to cover both sets of circumstances would be a good idea grin
Posted By: Kelder Re: Automatic nick login script - 06/12/05 10:14 AM
Some servers with nickserv allow to do /nickserv <command> instead of /msg nickserv <command>. (Ofcourse, if you have such an alias, use /raw -q nickserv <command>) This is a little more secure since other people can't /nick nickserv during netsplits or on other networks without services and thus get your password...

My auto-identification looks something like this:
Code:
on *:connect:id

alias id {
  var %mypass = mypassword
  if ($isid) return %mypass
  if ($network isin Strange1;Strange2) var %mypass = $left($md5($+(%mypass,$v1)),16)
  if ($network isin Network1;Network2;Strange1;Strange2) .nickserv identify %mypass
  elseif ($network == Quakenet) {
    .msg Q@CServe.quakenet.org AUTH $nick %mypass
    .mode $me +x
  }
  ; etc...
}
© mIRC Discussion Forums