This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

unbaning when channel banlist is full

Old posts that have not been replied to for several years.
Locked
t
tradergt

unbaning when channel banlist is full

Post by tradergt »

This script I don't know where to start. How would I got about unbanning the oldest X bans when the banlist becomes full?? (but leave them in the bot of course.)

I am on dalnet if that matters...

Thanks,
Jeff
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Well, it's quite easy really. In your script, monitor new bans (MODE bind). Each time a ban is set, count the number of entries in the channel ban list (llength and chanbans). If it gets to within 5 of the maximum allowed, sort the bans by age (lsort), then unban the last 5 bans or so (for loop, putserv or killchanban).

That's basically your whole script.
t
tradergt

Post by tradergt »

I did get a script working with your ideas already. Did not think of the lsort however and will have to look into that..

Thanks for that extra idea.
Locked