mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2016
Posts: 9
P
Pug1 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Sep 2016
Posts: 9
Hi,

Not sure if this should be a script or a perform or ???

Basically, if a certain message appears in the server status window, i want mIRC to respond (in the same window) with a /msg Nickserv etc..

The message does not show in any channel window, and all the scripting examples I've seen assume channels for some reason. But in my case, the text is only in the status window.

How do I code that?

Thanks. smile

Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
Code:
on *:NOTICE:*:?:{
  if ($nick == NickServ) {
    ;; Private notice received from NickServ
  }
}


I am SReject
My Stuff
Joined: Sep 2016
Posts: 9
P
Pug1 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Sep 2016
Posts: 9


Where would I put that text?


(Seems watched topic emails don't work...)

Joined: Feb 2011
Posts: 462
K
Pan-dimensional mouse
Offline
Pan-dimensional mouse
K
Joined: Feb 2011
Posts: 462
Tools -> Script Editor -> Remote Tab

Joined: Sep 2016
Posts: 9
P
Pug1 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Sep 2016
Posts: 9
Thanks. I just need to get the exact text, so I'll respond back when that happens.

Joined: Sep 2016
Posts: 9
P
Pug1 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Sep 2016
Posts: 9
I have this:

Code:
on *:NOTICE:*you need to be identified with services*:{
  ns identify xxxxx
}



and it doesn't work.
What else can you suggest?

Every few seconds this message appears in the status channel:

Code:
Cannot join channel (+r) - you need to be identified with services
-


but it has no user name, and it isn't a server message.

Joined: Aug 2016
Posts: 36
Ameglian cow
Offline
Ameglian cow
Joined: Aug 2016
Posts: 36
You don't have the ? as shown in the example. It should be:

Code:
on *:NOTICE:*you need to be identified with services*:?:{
  ns identify xxxxx
}

Joined: Sep 2016
Posts: 9
P
Pug1 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Sep 2016
Posts: 9
OK did that, still waiting for the actual situation to reoccur.

In the meantime I also added this, going on the example above:
Code:
on *:NOTICE:This nickname is registered.*:?:{
  (if $nick == NickServ)
  ns identify xxxxx
}


It seems to work, but an error appears in the status channel. It says:
Code:
(IF Unknown command
Is there a syntax error?

Joined: Feb 2011
Posts: 462
K
Pan-dimensional mouse
Offline
Pan-dimensional mouse
K
Joined: Feb 2011
Posts: 462
Code:
on *:NOTICE:This nickname is registered.*:?:{
  if ($nick == NickServ) {
    ns identify xxxxx
  }
}



https://en.wikichip.org/wiki/mirc/conditional_statements

Joined: Sep 2016
Posts: 9
P
Pug1 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Sep 2016
Posts: 9
Originally Posted By: ruprecht
You don't have the ? as shown in the example. It should be:

Code:
on *:NOTICE:*you need to be identified with services*:?:{
  ns identify xxxxx
}


Not working.

Joined: Aug 2016
Posts: 36
Ameglian cow
Offline
Ameglian cow
Joined: Aug 2016
Posts: 36
Originally Posted By: Pug1
Originally Posted By: ruprecht
You don't have the ? as shown in the example. It should be:

Code:
on *:NOTICE:*you need to be identified with services*:?:{
  ns identify xxxxx
}


Not working.


That's odd. It should work. This is a section of my Undernet login script:

Code:
on *:CONNECT: { unid | .timerlx 0 300 unid }
on *:NOTICE:*AUTHENTICATION SUCCESSFUL*:?: { mode $me +x | .timerlx off }
alias unid { .msg X@channels.undernet.org login %unusr %unpwd }

It tries to login when connected, and then every 5 minutes until successful. The notice event should trigger the same regardless if it's from x or nickserv. Assuming this is the case, all I can suggest is to try the long format:
Code:
/msg nickserv identify xxxxx


If the notice event isn't triggering then I have no idea. It's been many years since I've had dealings with a nickserv.

Joined: Sep 2016
Posts: 9
P
Pug1 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Sep 2016
Posts: 9
I've currently got

Code:
on *:NOTICE:*you need to be identified with services*:?:{
  ns identify xxxxxx
}


but it isn't being triggered at all. It isn't a server message, and it does not show the sender. It does show every minute or so, so a timer isn't needed. It seems mIRC is not capable of seeing or acting on this message.

Maybe I need to use a timer to blindly authenticate every 15 minutes "just in case". I can't think of anything else.

If anyone wants to try investigating, you need to connect to freenode, and then try connecting to a channel that requires registration, such as #mame-dev .

Joined: Aug 2016
Posts: 36
Ameglian cow
Offline
Ameglian cow
Joined: Aug 2016
Posts: 36
Originally Posted By: Pug1
If anyone wants to try investigating, you need to connect to freenode, and then try connecting to a channel that requires registration, such as #mame-dev .


Ok I see now what your problem is. That's not a server notice. It's a message with raw numeric 477.
Quote:
-> rajaniemi.freenode.net JOIN #mame-dev
<- :rajaniemi.freenode.net 477 ruprecht #mame-dev :Cannot join channel (+r) - you need to be identified with services


Use this instead:
Code:
raw 477:*you need to be identified with services*:{
  ns identify xxxxxx
}

Joined: Sep 2016
Posts: 9
P
Pug1 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Sep 2016
Posts: 9
Originally Posted By: ruprecht
Ok I see now what your problem is. That's not a server notice. It's a message with raw numeric 477.
[quote]-> rajaniemi.freenode.net JOIN #mame-dev
<- :rajaniemi.freenode.net 477 ruprecht #mame-dev :Cannot join channel (+r) - you need to be identified with services

All I see is "Cannot join channel (+r) - you need to be identified with services", so hopefully 477 is the number used by all freenode servers.

Originally Posted By: ruprecht
Use this instead:
Code:
raw 477:*you need to be identified with services*:{
  ns identify xxxxxx
}


I've added that in, i'll see what happens. Thanks!

Joined: Aug 2016
Posts: 36
Ameglian cow
Offline
Ameglian cow
Joined: Aug 2016
Posts: 36
Originally Posted By: Pug1
All I see is "Cannot join channel (+r) - you need to be identified with services", so hopefully 477 is the number used by all freenode servers.


You have to turn on debug mode to see raw messages. 477 is the need reg'd nick message. It's the same across most IRC networks that use chanmode +r.

Joined: Sep 2016
Posts: 9
P
Pug1 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Sep 2016
Posts: 9
Well, it does appear to work successfully, so thanks to ruprecht for the solution. smile


Now, if only the admins could fix the forum so (a) I don't get logged out every week; and (b) the notification email from a Watched Topic would work; then I'd be very happy indeed....

Joined: Aug 2016
Posts: 36
Ameglian cow
Offline
Ameglian cow
Joined: Aug 2016
Posts: 36
My pleasure grin


Link Copied to Clipboard