im wondering that too.. i have the code to read a random line from a file here, but its locating the file im having trouble with.
its in my botdir in the text folder. how'd i access that if it was say text.txt?
Not dead sure if this is what you can use, but it works for me. If its just grabbing a random line (for say an 8ball or something) you can use this. You can put the lines you want to pick from into the tcl and let this do the rest. hope it works for ya.
bind pub - !randomc pub_random
proc pub_random {nick mask hand channel args} {
global blah
puthelp "PRIVMSG $channel :[lindex $blah [rand [llength $blah]]]"
}