mIRC Home    About    Download    Register    News    Help

Print Thread
#46229 01/09/03 07:16 PM
Joined: Jan 2003
Posts: 150
J
J0ke Offline OP
Vogon poet
OP Offline
Vogon poet
J
Joined: Jan 2003
Posts: 150
This would be very good adition. #)(%*@#% floodclones...


Go ahead, jump. 100,000 lemmings can't be wrong.
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
on ^*:TEXT:*:?:{
if (!%flood) {
set -u5 %flood 1
}
elseif (%flood <= 5) {
inc -u5 %flood
}
elseif (%flood > 5) {
window -c $nick | haltdef
}
}


new username: tidy_trax
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Once again, massive correcting of code:

Code:
on *:TEXT:*:?: {
  [color:green]; no need to check if %flood exists. inc will increment to 1 if it doesn't[/color]
  inc -u5 %flood
  [color:green]; trigger only when it IS 5 to avoid creating a flood yourself[/color]
  [color:green]; although there is little to no chance of that with the /ignore in place[/color]
  if (%flood == 5) { 
    [color:green]; ignore all queries for the next 60 seconds.[/color]
    [color:green]; not doing this will keep the script triggering over and over and over and over....[/color]
    ignore -mu60 *!*@*
    [color:green]; since you used ? for query, you might wanna use -m (query) and not -c (dcc chat),[/color]
    [color:green]; and leave out the $nick so ALL query windows get closed instead of just the last[/color]
    [color:green]; nick who msgd you (this will also work against a multiple-nick query flood...)[/color]
    close -m
    [color:green]; haltdef? why? there is no reason for it in this code[/color]
  }
}


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
even though there was no faults, you just felt you had to improve it crazy


new username: tidy_trax
Joined: Jan 2003
Posts: 150
J
J0ke Offline OP
Vogon poet
OP Offline
Vogon poet
J
Joined: Jan 2003
Posts: 150
I would like to see it built in. "Protection against multiple queries being opened." Maybe an option to set max queries would be good. Theese examples wont work against 350 floodclones... mIRC just hangs untill all 350 queries r opened...


Go ahead, jump. 100,000 lemmings can't be wrong.
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
No faults? I would consider the part where your code only works against a single-nick flood a major fault in a flood protection script. If someone loads a few dozen floodbots that each start flooding you your code doesn't stand a chance, as it won't do. It will nicely close each 5th message window, allowing all the other bots to flood you into oblivion.

Then a minor fault being the pointless if statements, which take time and slow down the effectiveness of the code.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Actually, my code will protect against 350 queries being opened -- when the 5th query opens within 5 seconds, all others will be ignored. So the other 345 queries won't be opened. A few may slip by, but it can't be much.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
Joined: Dec 2002
Posts: 25
V
Ameglian cow
Offline
Ameglian cow
V
Joined: Dec 2002
Posts: 25
Quote:

I would like to see it built in. "Protection against multiple queries being opened." Maybe an option to set max queries would be good. Theese examples wont work against 350 floodclones... mIRC just hangs untill all 350 queries r opened...


on ^*:OPEN:?:*: {
if ($query(0) >= 20) {
if (!$window($+(@Query, $cid))) {
window -nv $+(@Query, $cid)
}
aline -hpi2 $+(@Query, $cid) $timestamp $+(<,$nick,>) $1-
halt
}
}

Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
Code:
on ^*:TEXT:*:?:{
  if (!%flood) {
    set -u5 %flood 1
  }
  elseif (%flood &lt;= 5) {
    inc -u5 %flood
  }
  elseif (%flood &gt; 5) {
    inc -u5 %flood
    window -c $nick | haltdef
  }
} 

add an extra inc -u5 and its fine :tongue:


new username: tidy_trax
Joined: May 2003
Posts: 161
A
Vogon poet
Offline
Vogon poet
A
Joined: May 2003
Posts: 161
The option for ignoring private messages is -p, not -m. -m will appear to work but it actually ignores everything.

Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Actually it's not - it still won't actually protect you from the flood. You just keep on closing windows until the server disconnects you for being flooded. You cannot script this right without at some point flipping an ignore.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
My bad.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
Joined: Dec 2002
Posts: 43
P
Ameglian cow
Offline
Ameglian cow
P
Joined: Dec 2002
Posts: 43
if your worried about so many clones attacking use /silence

Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
/silence list is limited to 10, on my network anyway, and is useless unless all clones have an identical user ID. A better option, if your server software supports it is /umode +m as it stops private messages at server level. You would only need to have this on fairly briefly as you'd then have time to manually block the attack while not feeling the affects of it.

Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
EFNet just added this exact feature, but it's usermode +g
//mode $me +g

Blocks all private messages, notices, etc.. and warns you via /notice if someone is trying to contact you... unless you're being flooded. I'm guessing if you're being flooded while you're +g, it alerts opers present and aids them in k-lining them, since it would be obvious they're blindly messaging someone who doesn't want to be messaged.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
On DALnet you could use mode +R, which stops msgs from users who haven't identified to NickServ -- which is exactly the reason I used /ignore. /silence is limited, and so many networks have so many relevant usermodes. The user should be able to change the /ignore with something that might work better on his network, but for all purposes, I feel a network-independent code fits best on these forums, unless the user in his question clearly states he wants to use the code on a certain network.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
Joined: Apr 2003
Posts: 426
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 426
Actually, you are incorrect in using -c in the ignore command for DCC's.


The help file lists -d for ignoring DCC's. -c is for Channels.


--------
mIRC - fun for all the family (except grandma and grandpa)

Link Copied to Clipboard