##########
#     File displayer
#    made for mutante
#           on
#       (4/30/03)
#     have fun mutante
#  and the others that use this script
# ---> #moon @ EFnet <----

###  ###  ###  ###  ###  ###  ###  ###  #
# Set your file to open, pls use your full path
###  ###  ###  ###  ###  ###  ###  ###  #

set filename "/home/hellfire/eggdrop/scripts/fnord.txt"
set filename0 "/home/hellfire/eggdrop/scripts/discordian_quotes.txt"

###  ###  ###  ###  ###  ###  ###  ###  #
# If you want to change the fnord or the discordian part
# this is what the bot will respond to, if you type in fnord or discordian
###  ###  ###  ###  ###  ###  ###  ###  #

bind pubm - "*fnord*" displayme
bind pubm - "*discordian*" displayme0

###  ###  ###  ###  ###  ###  ###  ###  #
# Set what channels you want it to display in
# If you want it for all chans, then your done with the config
###  ###  ###  ###  ###  ###  ###  ###  #

###  ###  ###  ###  ###  ###  ###  ###  ###
# If you edit stuff past this line it will not work :(    #
###  ###  ###  ###  ###  ###  ###  ###  ###
#  if you don't want all chan
#  Add this line to the procs and then set your chan with .chanset
#thechanyouwant +discordian
# if {[lsearch [channel info $chan] +discordian]==-1} { return 0 }
###  ###  ###  ###  ###  ###  ###  ###  ###

proc displayme {nick host hand chan text} {
global filename chann
set io [open $filename r]
 set file ""
 while {![eof $io]} {lappend file [gets $io]}
 close $io
 set file [join $file \n]
set newfile [split $file \n]
set dog [lindex $newfile [rand [llength $newfile]]]
putserv "PRIVMSG $chan :$dog"
}
putlog "SmOke One up for the Cat -=- BlackCat @ efnet"
proc displayme0 {nick host hand chan text} {
global filename0 chann
set io [open $filename0 r]
 set file ""
 while {![eof $io]} {lappend file [gets $io]}
 close $io
 set file [join $file \n]
set newfile [split $file \n]
set dog [lindex $newfile [rand [llength $newfile]]]
putserv "PRIVMSG $chan :$dog"
}


