mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
OP Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
I was trying to do a DCC blocker and wanted to use the IP addy from the "DCC Notice" line. Long story short, $gettok($1-,-1,40) was the only way I could get the IP add without going thru a loop of $n or parens (since the ip addy will always be last but the paren could technically appear anywhere). When did that start working for $gettok? I know it's worked on $right/$left for a while now, but was just wondering


Those who fail history are doomed to repeat it
Joined: Feb 2003
Posts: 15
R
Pikka bird
Offline
Pikka bird
R
Joined: Feb 2003
Posts: 15
You may try this idea ...
on *:notice:*dcc send*:?: { ignore $address($nick,1) }

Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
It has always been working, that's why I liked $*tok identifiers.

Btw, you'd better get the IP address from the CTCP command (I suppose you know that dcc requests are ctcps) rather than the notice. That's because the IP in notice can be faked, while the IP in ctcp cannot, since it's the IP that the sender wants you to connect to. Example:
Code:
ctcp *:dcc send *?:?: if $regex($1-,/^dcc send (\S+|".+?") (\d+)/i) { var %file = $regml(1), %ip = $longip($regml(2)) | echo -s Filename: %file , IP: %ip }


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
OP Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
kewl, I just never needed it before so I never knew it. As far as CTCP notices for DCC being faked, I know, that's not the ONLY way I ignore them. I use a few different things to ignore them with which has served me well, but thanks for the heads up qwerty smile


Those who fail history are doomed to repeat it

Link Copied to Clipboard