hi, i have a script that read from a text file... now its reading allt the text in the file but i whant it to only read the last line...
::: Here is the script :::
set bfile "/usr/local/eggdrop/asobiba/lan.txt"
set cmd "!nextlan"
set bwhere 1
bind pub -|- $cmd dumpfile
proc dumpfile {nick handle host chan text } {
global bfile bwhere
set foo [open $bfile r]
while { ! [eof $foo] } {
set line [gets $foo]
if {!$bwhere} {
puthelp "NOTICE $nick :$line"
} else {
puthelp "NOTICE $chan :$line"
}
}
}