This is a Channel Limiter for a Bot script which basicly sets a limit on the channels your bot is on with your desired margin/offset within a certain time to avoid mass join floods. The limit offset & the amount of time to update is configurable for each channel. To Enable/Disable: Type !climit on/off To set the Offset/Update for each channel: Type !climit offset/Update <settings(Must be a number)> ( Note: Limit Offset /Update must be configured before you can enable the limiter for each channel. )
I knew you\'d misunderstand. The way you have it coded, it\'s going to do a +| period. So, if no one enters or leaves the room in 5 hours (hypothetically speaking), your code will set a +| every five minutes, the default setting. So, you would see in the channel, every five mins:
[8:35pm] ChanLimit sets mode: +l 32
[8:40pm] ChanLimit sets mode: +l 32
[8:43pm] hello room, good day today
[8:45pm] ChanLimit sets mode: +l 32
[8:50pm] ChanLimit sets mode: +l 32
Whereas, what I\'m talking about is that when a user enters, or parts, THEN a timer goes to, say, 60 seconds and checks the room and increases/decreases the current channel limit to the needed offset value, such as:
[7:38pm] Anonguy(Linux@192.168.0.1) has parted. 21 people
[7:49pm] ChanLimit sets mode: +l 31
[8:22pm] Another1 (WinXP@195.168.0.1) has joined. 22 people
[8:22pm] Hello room, good day today.
[8:23pm] ChanLimit sets mode: +l 32
[10:47pm] Well, time to go, good-bye.
[10:47pm] Another1 (WinXP@195.168.0.1) has parted. 21 people
[10:48pm] ChanLimit sets mode: +l 31
Notice how the bot ChanLimit checks and \'fixes\' the channel limit in corresponding to a user on a join and part (a Quit action should theorically be checked with it as well) instead of doing a \'set mode\' every five minutes, reguardless of activity like in the first example. This is what I was talking about, and referring too. If you are still confused by it, then I guess I\'ll have to throw myself back into script writing and come up with my own formula and provide it for those that are looking for the same goal and solution.
Good script, but for one problem. How about instead of updating every certain amount of time all the time, like 5 mins., updated 60 seconds after a user parts/joins? This makes for a cleaner channel to see that it limits the channel 60 seconds after a user were to part, instead of every 5 mins. reguardless of anyone joining or leaving. This is also lighter on those who save logs for issues that may come up, such as abusers, and not see LimiterNick sets mode: +l 33 at a time of every five minutes.
where is the actual code ?