Help with DCC block regex

These are old archives. They are kept for historic purposes only.
Post Reply
White_Magic
Posts: 267
Joined: Tue Jan 18, 2005 3:24 pm
Location: Scotland - United Kingdom

Help with DCC block regex

Post 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
i spend 4 hrs a day gaming and 14hrs on irc, for 5days a week, im not an addict :D
Dukat
Posts: 1083
Joined: Tue Mar 16, 2004 5:44 pm
Location: Switzerland

Post 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}
If you don't make mistakes, you aren't really trying.
- Coleman Hawkins
w00t
Posts: 1136
Joined: Thu Mar 25, 2004 3:31 am
Location: Nowra, Australia

Post 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)
-ChatSpike IRC Network [http://www.chatspike.net]
-Denora Stats [http://denora.nomadirc.net]
-Omerta [http://www.barafranca.com]
Dukat
Posts: 1083
Joined: Tue Mar 16, 2004 5:44 pm
Location: Switzerland

Post by Dukat »

Yeah, that would work too... I usually just try to match as much as possible... :D
If you don't make mistakes, you aren't really trying.
- Coleman Hawkins
aquanight
Official supporter
Posts: 862
Joined: Tue Mar 09, 2004 10:47 pm
Location: Boise, ID

Post 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).
TigerKatziTatzi
Posts: 36
Joined: Fri Apr 08, 2005 12:10 pm

Post 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.
w00t
Posts: 1136
Joined: Thu Mar 25, 2004 3:31 am
Location: Nowra, Australia

Post 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
-ChatSpike IRC Network [http://www.chatspike.net]
-Denora Stats [http://denora.nomadirc.net]
-Omerta [http://www.barafranca.com]
aquanight
Official supporter
Posts: 862
Joined: Tue Mar 09, 2004 10:47 pm
Location: Boise, ID

Post by aquanight »

c target...
w00t
Posts: 1136
Joined: Thu Mar 25, 2004 3:31 am
Location: Nowra, Australia

Post by w00t »

>.^

I didn't know there was a difference between private/channel messages. Guess you learn something every day.
-ChatSpike IRC Network [http://www.chatspike.net]
-Denora Stats [http://denora.nomadirc.net]
-Omerta [http://www.barafranca.com]
White_Magic
Posts: 267
Joined: Tue Jan 18, 2005 3:24 pm
Location: Scotland - United Kingdom

Post 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.....
i spend 4 hrs a day gaming and 14hrs on irc, for 5days a week, im not an addict :D
Stealth
Head of Support
Posts: 2085
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Post 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.
aquanight
Official supporter
Posts: 862
Joined: Tue Mar 09, 2004 10:47 pm
Location: Boise, ID

Post 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})
Post Reply