|
Joined: May 2003
Posts: 1
Mostly harmless
|
OP
Mostly harmless
Joined: May 2003
Posts: 1 |
I am new to the IRC scripting world and I would like a script that will increase and decrease the limit of a channel by how many users are present. I want the limit to stay 5 over the number of users currently in the channel. If you have trouble understanding what I am asking, I will try to explain it using some C++ code since I know how to code in that...... int limit, count; if((count+5)>limit||(count+5)<limit) limit=count+5; Any help would be great
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
on @1:JOIN:#: { .timerlimit [ $+ [ $chan ] ] 1 5 /mode $chan +l $calc($nick($chan, 0) + 5) } on @1:PART:#: { .timerlimit [ $+ [ $chan ] ] 1 5 /mode $chan +l $calc($nick($chan, 0) + 5) }
-KingTomato
|
|
|
|
Joined: Jan 2003
Posts: 96
Babel fish
|
Babel fish
Joined: Jan 2003
Posts: 96 |
on @1:JOIN:#: { .timerlimit [ $+ [ $chan ] ] 1 5 /mode $chan +l $calc($nick($chan, 0) + 5) }
on @1:PART:#: { .timerlimit [ $+ [ $chan ] ] 1 5 /mode $chan +l $calc($nick($chan, 0) + 5) } You might want to add a channel name, so you dont set limits in all chans youre opped in. on @1:JOIN:#channelname: { .timerlimit [ $+ [ $chan ] ] 1 5 /mode $chan +l $calc($nick($chan, 0) + 5) } on @1:PART:#channelname: { .timerlimit [ $+ [ $chan ] ] 1 5 /mode $chan +l $calc($nick($chan, 0) + 5) }
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
on *:JOIN:#:{ .timer 1 1 /mode # +l $calc($nick($chan,0) + 1) }
new username: tidy_trax
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
That snippet won't help at all. In fact, in the event of a clone flood, your script will further add to the flood! It will change the limit every 1 second, how is that going to stop anyone from joining?
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
no..... it will increase the limit by 1 after waiting 1 second after sum1 has joined
new username: tidy_trax
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
ok, so I have 500 clones each set to wait 2 seconds before joining. total users: 29 +l 30 JOIN +l 31 JOIN +l 32 JOIN +l 33 JOIN +l 34 JOIN +l 35 JOIN +l 36 JOIN +l 37 JOIN ... That does NOTHING to stop the flood and all it does is now instead of just being flooded with joins, you are also flooded with +l sets. The eggdrop scripts that do the same thing have a MUCH larger period. They set it currentusers+5 or currentusers+10 and they only execute the timer every 5 or ten MINUTES. Setting it to go even every 5 seconds still won't stop a flood. Most of the bots are set to keep trying to join. So if it gets a +l error, it will just try and join again, and since 4 seconds later the +l is changed, it will now make it in.
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
on *:JOIN:#:{ if ($nick($chan,0) >= 100) { HALT } else { .timer 1 1 /mode # +l $calc($nick($chan,0) + 1) } }
new username: tidy_trax
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
Just accept it, your script is not going to work. What just changed didn't fix anything, in fact it made it worse. Because now, the channel can NEVER have more than 100 people in it.
|
|
|
|
Joined: Apr 2003
Posts: 426
Fjord artisan
|
Fjord artisan
Joined: Apr 2003
Posts: 426 |
Thats why a clone joiner protection script is a smart move. You can see ones at http://www.team-clanx.net in their protection area. Just note, that because it is a mIRC script, it won't be as fast responding as an eggdrop one.
-------- mIRC - fun for all the family (except grandma and grandpa)
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
well than i could just write a more complex script saying if someone has the same address in the room 3 times then dont increase the limit for that address.
new username: tidy_trax
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
Umm and the majority of join/part flood attacks don't involve clones, they involve some form of drone bot, so yet again, your script wouldn't work.
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
Was there something wrong with mine and the 5 sec delay? >:\
-KingTomato
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
Well the only comment I had with yours is, most eggdrops use a MUCH larger delay. I have my eggdrop set to do curlim+10 and change it every 5 minutes. I've seen channels that have the timer set even higher than that, in fact the script I use the default was to wait 10 minutes.
|
|
|
|
|