writing of awyeah
The TCL works fine, the problem is that when the ban list is full, the message is repeated twice when sent.
example:
NOTICE @$chan :BANLIST FULL: WARNING
or
NOTICE @$chan :BANLIST FULL: WARNING
######################################
## -------------------------------- ##
## Channel Banlist Cleaner Script ##
## -------------------------------- ##
######################################
#Set the channels you want this script activated on
set banlistchans "*"
# Change this variable to how many bans you dont want
# your banlist to go past. Most DALnet servers dont
# allow more than 100, so you should keep it around 98.
set maxbanlist 85
###### Don't change anything below here ######
###### unless you know what you are doing! ######
bind mode - "*+b*" clear:banlist
proc clear:banlist {nick uhost hand chan mode arg} {
global botnick banlistchans maxbanlist
set numbanlist [llength [chanbans $chan]]
if {(([lsearch -exact [string tolower $banlistchans] [string tolower $chan]] != -1) || ($banlistchans == "*")) && ($mode == "+b") && ($numbanlist >= $maxbanlist)} {
if (![botisop $chan]) {return 0}
putserv "NOTICE @$chan :BANLIST FULL: WARNING - $chan's banlist was detected to be *full* of nearly 100 entries, with $numbanlist bans."
putserv "NOTICE @$chan :CLEARING BANLIST: The banlist for $chan is now being *cleared* to 0 entries."
putlog "BANLIST: Clearing the banlist of $chan, as it is full."
utimer 3 "resetbans $chan"
}
return 0
}
Last edited by Arnold_X-P on Wed Apr 30, 2025 12:00 am, edited 1 time in total.
.:an ideal world:. www.geocities.ws/chateo/yo.htm
my programming place /server ix.scay.net:7005
networks: DALnet #tcls ChatZona #tcl Libera.Chat #tcls