mIRC Homepage
Posted By: bdb22 script to autochange limit of a channel - 14/05/03 06:26 AM
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 grin
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) }
Posted By: Jesper Re: script to autochange limit of a channel - 14/05/03 11:47 AM
Code:
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) }
Posted By: pheonix Re: script to autochange limit of a channel - 14/05/03 05:04 PM
on *:JOIN:#:{
.timer 1 1 /mode # +l $calc($nick($chan,0) + 1)
}
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?
Posted By: pheonix Re: script to autochange limit of a channel - 14/05/03 05:08 PM
no.....
it will increase the limit by 1 after waiting 1 second after sum1 has joined
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.
Posted By: pheonix Re: script to autochange limit of a channel - 14/05/03 05:17 PM
on *:JOIN:#:{
if ($nick($chan,0) >= 100) {
HALT
}
else {
.timer 1 1 /mode # +l $calc($nick($chan,0) + 1)
}
}
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.
Posted By: neophyte Re: script to autochange limit of a channel - 14/05/03 11:11 PM
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.
Posted By: pheonix Re: script to autochange limit of a channel - 15/05/03 09:04 AM
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.
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.
Was there something wrong with mine and the 5 sec delay? >:\
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.
© mIRC Discussion Forums