This command provides several operations on a file's name or attributes. Name is the name of a file; if it starts with a tilde, then tilde substitution is done before executing the command (see the manual entry for filename for details). Option indicates what to do with the file name. Any unique abbreviation for option is acceptable.

# Returns a random line out of $file (error if it doesnt exist)
procrandline{file}{set fs [open $file r]set data [read -nonewline $fs]
close $fs# Now we have the complete content of $file stored in $data
set data [split $data \n]# Now it's a list of lines, and we use eggdrop's "rand" function to get a random element from it (and return it)
#return [lindex $data [rand [llength $data]]]
# replaced by cybex with a Tcl rand
return[lindex $data[expr{int(rand()*[llength $data])}]]}

Could you please post a script that will make the eggdrop to send a text on a channe 1 time a week, another eggdrop i dont own answers to the message and sends a file to my eggdrop, i want my eggdrop to reject the file but to check if the file name is different from another filename inside records.txt, if different, to write new file name inside records.txt delete old one. Records.txt will always have only 1 line.

Ignore this topic(Do not list this topic in the "unread topics" search. You are currently not ignoring this topic.)Hide this topic(Hidden topics are not displayed in the topics list. This topic is currently not hidden.)