Code: Select all
bind ctcp - "!dead" clear:dead
proc clear:dead {nick uh hand dest key arg} {
regexp -all -- " " $arg "*" src
set src "*${src}*"
set in [split [read [set fp [open zlist14.txt r]]] \n]
close $fp
if {[set idx [lsearch $in $src]] >= 0} {
set in [lreplace $in $idx $idx]
set fp [open zlist14.txt w]
puts $fp $in
close $fp
puthelp "PRIVMSG $nick :\00307Deleted \002 $arg \002 \00312Thx For Helping To Keep The List \002Clean"
} else {
oputhelp "PRIVMSG $nick :\00307Did \002Not\002 Find Anything For \00312\002 $arg"
}
}
Code: Select all
set srd ""; regexp -all -- " " $arg "*" src
Code: Select all
puts $fp $in
Code: Select all
puts $fp [join $in \n]
Don't you mean "set src" and "regsub"?ppslim wrote:Code: Select all
set srd ""; regexp -all -- " " $arg "*" src