mIRC Home    About    Download    Register    News    Help

Print Thread
#83465 19/05/04 03:43 PM
Joined: Nov 2003
Posts: 9
D
doh Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Nov 2003
Posts: 9
hi,

i've never before created a script for mirc, but since it is getting more and more anoying to type the cmd over and over again manually, i'd like to ask for some help creating a simple script for this process.

i'd like to change my nick back to the primary nick which has been set in the mirc-options. you know, like when there's been a netsplit, you return to the channel with the secondary nick you've chosen in options and after some time the old nick pings out. then you have to type /nick .. to change it back. i'd like to automate this process instead of typing /nick .. all by myself.

furthermore it would be nice if there's a way to include identify process w/nickserv.

i know this might sound very easy to you, but please help a noobie out here.

thanks

#83466 20/05/04 01:43 AM
Joined: Dec 2002
Posts: 208
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 208
there are a few ways u could go about doing this

the simplest is probably adding yourself to notify and useing the on unotify event

check to see if its your nick that has left, and if so change your nick to that niick and identify

the problem however will be if u ever wish to change your nick to something else, mIRC will automaticly change it back, perhaps u can add a flag in a /nick alias that unsets after 10 secs or so, that the on unotify event can read to see if it should change your nick back or not

this should be enough information to get you though, but if u require more speak up.

Cobra^

#83467 20/05/04 06:28 AM
Joined: Apr 2003
Posts: 36
L
Ameglian cow
Offline
Ameglian cow
L
Joined: Apr 2003
Posts: 36
I personally use the following, and will do a brief explanation:
Code:
on 1:quit:if ( $nick == $mnick && $me == $anick ) nick $mnick

ok, $mnick is your primary nick, $anick is your secondary nick, so if your primary nick quits, and you are as you secondary nick, you switch back to being the primary nick. This allows for you to change your nick to some 3rd nick, have your 1st nick disconnect, and you aren't automatically changed to your first nick. (I pasted this because I didn't think of this for a long time for some reason, and it is so simple!)

As far as auto identifying, a quick on notice does the job, have a look at: /help on notice

#83468 20/05/04 11:19 AM
Joined: Nov 2003
Posts: 9
D
doh Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Nov 2003
Posts: 9
thx, on 1:quit:if.. works great

Quote:
As far as auto identifying, a quick on notice does the job,


well, problem is that it will msg nickserv on all networks, even those i'm not registered to. i'd like it more if its triggered by an event, like the /ctcp from nickserv "This nickname is registered*".

i already tried:

on 1:CTCP:This nickname is registered*:/msg nickserv identify <..>

but it won't work, any suggestions?

#83469 20/05/04 11:24 AM
Joined: Sep 2003
Posts: 584
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
i think that Nickserv gives NOTICE, not CTCP, so change on NOTICE instead on CTCP event...

#83470 20/05/04 12:05 PM
Joined: Nov 2003
Posts: 9
D
doh Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Nov 2003
Posts: 9
hm..

on 1:notice:*/msg NickServ IDENTIFY password*:/msg nickserv identify <password>

won't work either. maybe theres sth wrong with the variables?

#83471 20/05/04 12:14 PM
Joined: Sep 2003
Posts: 584
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
try

on 1:notice:*/msg*NickServ*IDENTIFY*password*:/msg nickserv identify (yourpassword)

#83472 20/05/04 12:33 PM
Joined: Nov 2003
Posts: 9
D
doh Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Nov 2003
Posts: 9
nope, no reaction when nickserv claims identify frown

#83473 20/05/04 12:52 PM
Joined: Sep 2003
Posts: 584
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
on 1:notice:*/msg NickServ IDENTIFY password*:*:{ /msg nickserv identify (yourpassword) }

this should work

ADD: this scriptie should make job easier

on 1:notice:*/msg NickServ IDENTIFY password*:*:{
if ($nick == NickServ) {
.timer 1 0 /msg nickserv identify (yourpassword)
halt
}
}



Last edited by bunar; 20/05/04 12:55 PM.
#83474 20/05/04 01:12 PM
Joined: Nov 2003
Posts: 9
D
doh Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Nov 2003
Posts: 9
thx, i had to change a little, but finally it works:

on 1:notice:*/msg*NickServ*IDENTIFY*password*:*:{/msg nickserv identify <yourpassword>

#83475 20/05/04 01:18 PM
Joined: Sep 2003
Posts: 584
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
no problem

#83476 21/05/04 02:39 AM
Joined: Apr 2003
Posts: 36
L
Ameglian cow
Offline
Ameglian cow
L
Joined: Apr 2003
Posts: 36
It is very good to understand that this method is NOT really all that safe. The problems occurs when you are on some network where the nick NickServ isn't restricted (there aren't many now) and someone else takes the nick, and sends you the notice. Services Impersonations are many times a bit ugly.

If the network you are on supports "/ns" instead of "/msg nickserv" I would strongly recomend you use this thinstead, as /ns will not send to anyone other than the server, thus being more secure.

Also, on why you went with all the *s in the line, most services put bold around "IDENTIFY", or underline "password". So a more secure option (I thought about posting it with the on quit, but didn't) would be to use the message right before that:
Code:
on 1:notice:This nickname is registered*:?: if ($nick == NickServ) { ns identify &lt;yourpassword&gt; }

I also tossed in the $nick == NickServ so that some goofball doesn't try to get you to re-identify

#83477 21/05/04 02:23 PM
Joined: Nov 2003
Posts: 9
D
doh Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Nov 2003
Posts: 9
i changed it according to your proposal & it works great.

thx for your support

#83478 23/05/04 01:24 AM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
Some suggestions to make it somewhat more secure. Just remember that your password is still in plain text on your computer, so anyone who uses your computer has access to it.

Code:
 on  [color:red]nickserv[/color]:notice:This nickname is registered*:?: {
if ( [color:purple]$network === MyNetIRC[/color] ) { ns identify &lt;yourpassword&gt; }
} 


Add this to your Users section (alt-R tab Users)
nickserv:NickServ!NickServ@services.yourircnet.com
(do a /whois nickserv and get the correct info)
More info: /help levels and /help $network

Just type $network<tab> (no not enter) in the status window to know what your network is called.


Link Copied to Clipboard