Page 1 of 1
Help with DCC block regex
Posted: Thu Jun 09, 2005 12:43 pm
by White_Magic
um i must be sleeping or sumthing but i cant get this to work so some help would be ncie and maybe why it wont work
Situation: people pasting -nickname- DCC SEND blah (iphere)
we dont want the ip to be shown. so, i thought
((?i)DCC).*([0-9]{3} )\.\3\.\3\.\3
would be the regex, however its not working...
ive also tryed...
((?i)DCC).*[0-9]{3} \.[0-9]{3} \. [0-9]{3} \. [0-9]{3}
and still nothing, :S
Posted: Thu Jun 09, 2005 12:49 pm
by Dukat
The regexps for the IP are wrong (both times)...
Try something like
Code: Select all
DCC SEND .+ ([0-9]{1,3}\.){3}[0-9]{1,3}
Posted: Thu Jun 09, 2005 1:06 pm
by w00t
Wouldn't just:
DCC SEND .+ ([0-9]{1,3}\.){3}
work fine?
(to me, that's matching 3 groups only - but it should still work fine, right? how many false positives can you expect in that kind of a case? :p)
Posted: Thu Jun 09, 2005 2:10 pm
by Dukat
Yeah, that would work too... I usually just try to match as much as possible...

Posted: Thu Jun 09, 2005 5:05 pm
by aquanight
Er... do you not realize that the IP is also included in the actual DCC request (the one that makes the "Chat/Send request" dialog pop up)? There's no point in blocking this. In fact, DCC can't work without sending the IP.
Yes, it's probably silly - afaik mIRC is the only client that sends this extra notice with DCCs, but nonetheless, once a DCC session is established, both sides can get the other's IP easily (netstat, client logging, etc).
Posted: Thu Jun 09, 2005 6:11 pm
by TigerKatziTatzi
dcc at itselfs has nothing directly todo with irc. its a client to client connection. reason most of xdcc-bottlers using proxy connection to hide their real ip. the showing of the ip in dcc transfer or dcc chat ist script based.
Posted: Thu Jun 09, 2005 10:59 pm
by w00t
I believe what he's trying to block is people (for some reason) pasting this line in a channel or something? in which case he could use the 'p' target no?
@TigerKatziTatzi: That's pretty much irrelevant for this discussion but anyhow ;P
Posted: Fri Jun 10, 2005 4:04 am
by aquanight
c target...
Posted: Fri Jun 10, 2005 5:19 am
by w00t
>.^
I didn't know there was a difference between private/channel messages. Guess you learn something every day.
Posted: Fri Jun 10, 2005 7:51 am
by White_Magic
yeah im using the cpnq targets for this
and its so a non ircop user doesnt acidently paste a ircops ip that tryed to dcc them something.....
Posted: Fri Jun 10, 2005 8:04 am
by Stealth
For a DCC, you should only need to have the c and p targets, as DCC's can't be sent any other way.
Posted: Fri Jun 10, 2005 3:14 pm
by aquanight
He's not talking about the DCC request, just the extra notice that mIRC seems to insist on sending...
Code: Select all
/spamfilter add pcnN block - Dont_paste_those_mkay. DCC (Chat|Send .*) ((\d{1,3}\.){3}\d{1,3})