Hi -
I am trying to output a text file to a channel via my bot. I have tried all the !trigger scripts I could find, but they all have the same problem. They will not output 2 lines of text that are the same.
EXAMPLE:
The text file looks like this:
commands you can use in this chan
.
!help
!list
!info
.
commands you can send to bot
!hi
!nfo
.
commands you can send to ops
!addme
!addhost
Ok ... but this is the output I get in the channel:
commands you can use in this chan
.
!help
!list
!info
commands you can send to bot
!hi
!nfo
commands you can send to ops
!addme
!addhost
Notice the period that I use as a seperator is now gone between each line. I have tried other characters in place of the period, thinking that was the problem, but it was not. No matter what I put on the line as a seperator, it will not print that line *if* it has allready printed it before.
Here is the code:
set bfile "/home/eggdrop/info.file"
set cmd "!help"
set bwhere 0
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"
}
}
}
Thanks