mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2012
Posts: 2
M
Bowl of petunias
OP Offline
Bowl of petunias
M
Joined: Jul 2012
Posts: 2
hi
hoping someone can help me out with this.im trying to write a script that after a person joins .it will ctcp request there list .if there list then sends to me i can auto voice them.but only if the list is recieved.this is how far ive got but with no luck..

on *:JOIN:#request_tester:{
/ctcp $nick list
on *:LISTRCVD:*.*: { /mode $chan +vvv $nick }
}

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
You were close-ish.

#1. Events cannot be nested in other events, they are all put at the top-level of your script. Your second event should be on its own line at the top-level (not inside any braces)

#2. There is no "LISTRCVD" event. You might want to be catching the CTCPREPLY event with LISTRCVD as a parameter.

Based on those notes, this is what you'd get:

Code:
on *:JOIN:#request_tester:/ctcp $nick list 
on *:CTCPREPLY:LISTRCVD:/mode #request_tester +vvv $nick


Again this is assuming LISTRCVD is a ctcpreply and not a notice/msg. I don't know the details of the remote script.

Note also that this will cause someone to get voiced any time they ctcpreply a LISTRCVD to you-- even if initialized a LIST command manually without an ON JOIN event. Typically we add guards to check if the nick being voiced is the one from our last JOIN event(s), but this will make your script significantly more complex, and I am leaving it out so you can understand the basics.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Jul 2012
Posts: 2
M
Bowl of petunias
OP Offline
Bowl of petunias
M
Joined: Jul 2012
Posts: 2
thanks for the help.. after its ctcp asks for the list you are send via the status window the message that the list has been recieved like this 14,0•04,00 OmeNServE v2.60 14,00•12,00 DCC Get Complete from kmz-test .ive tried the script you have put in and still no joy..so if you can suggest anything else that would be brilliant.ive also tried changing it to NOTICE instead of ctcpreply and still nothing its got me baffled lol

Last edited by mrwhippy; 13/07/12 08:18 PM.

Link Copied to Clipboard