here is the code
Code: Select all
# set the location of the banned.txt file
set banned_(txt) "/home/eggbots/eggdrop/scripts/banned.txt"
#set the sitename
set site_(name) "FtN"
#set the trigger
bind pub - !banned get:banned
bind pub - !addban get:addban
bind pub - !delban get:delban
proc get:banned {nick uhost handle chan arg} {
global banned_ site_
set fp [open $banned_(txt) "r"]
set data [read -nonewline $fp]
close $fp
set lines [split $data "\n"]
set line_sort [lsort -dictionary $lines]
set lines1 [split $line_sort "\n"]
putserv "privmsg $chan :\00314$site_(name)\003 - \0034(BaNNeD LiST)\003 - $lines1"
}
proc get:addban {nick uhost handle chan text} {
global banned_
if {$text == ""} {
putserv "PRIVMSG $chan :Usage: !addban <grpname>"
return 0
}
set line_to_add $text
set fname $banned_(txt)
set fp [open $fname "a"]
puts $fp $line_to_add
close $fp
putquick "PRIVMSG $chan : \0034Ban Added Sucessfully\003"
}
proc get:delban {nick uhost handle chan text} {
global banned_
set fp [open $banned_(txt) "r"]
set data [read -nonewline $fp]
close $fp
set lines [split $data "\n"]
set el_num [lsearch $lines $text]
if {$el_num != -1} {
set lines [lreplace $lines $el_num $el_num]
}
putquick "PRIVMSG $chan : \0034Ban Removed Sucessfully\003"
set fp [open $banned_(txt) "w"]
foreach element $lines {
puts $fp $element
}
close $fp
}
Code: Select all
FtN - (BaNNeD LiST) - {aBD AlternativePorn ANiURL CoWRY D3Si EiNFACHNORMAL GAYGAY JustDifferent Ltu MANLOVE N3WS NAMi ONEPiECE PMCG PR0N0Z ZHONGGUO}
many thx in advance