For what you have said and ppslim looking at the question it looks like you open the log file to write data in it.. when you start the command put somewhere in your tcl so it makes sure that the file is made / if not make the file for you
set thefile "/home/eggdrop/logs/"
if {![file exists $thefile/logfile.txt]} {
set newfile [open $thefile/logfile.txt w]
puts $newfile ""
close $newfile
}
If you put that at the top of the Tcl file without a proc everytime you .rehash the bot it will check to make sure the file is there.. If not it will make one for you.
I was talking about the tcl command "logfile" not my own proc
logfile [<modes> <channel> <filename>]
Description: creates a new logfile, which will log the modes given for
the channel listed. If no logfile is specified, a list of existing
logfiles will be returned. "*" indicates all channels. You can also
change the modes and channel of an existing logfile with this command.
Entering a blank mode and channel ("") makes the bot stop logging there.
Returns: filename of logfile created, or, if no logfile is specified, a
list of logfiles such as: {mco * eggdrop.log} {jp #lame lame.log}
Module: core
You type a DCC command, and a new logfile is started. When you do a rehash, this logfile is no longer ologged to, and requires that you type the command again.
This is the way that eggdrop is designed. When the bot loads, it reads the logfile lines along with the rest of the config file. As such, it reads them again on a rehash.
Any logile lines removed means that the logging stops on these.
You will need to do a lot more work to the Tcl, to get what you want.
You would have to write a line to file, including the logfile information.
You could then load this file on rehash, and start logging on these channels.