Code: Select all
# This sets the location of the file you want to be written out to someone in a msg
set bfile "/home/matt/eggdrop/scripts/url.txt"
#sets the command it should go on off in a chan or so
set cmd "!url"
#this is where you set where the file should be printed out
#private = 0
#channel = 1
set bwhere 1
## don't edit below this line -----------------------------------
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 "PRIVMSG $chan :$line"
}
}
}
# This sets the location of the file you want to be written out to someone in a msg
set cfile "/home/matt/eggdrop/scripts/console.txt"
#sets the command it should go on off in a chan or so
set cmdc "!console"
#this is where you set where the file should be printed out
#private = 0
#channel = 1
set cwhere 1
## don't edit below this line -----------------------------------
bind pub -|- $cmdc dumpfilec
proc dumpfilec {nick handle host chan text } {
global cfile cwhere
set foo [open $cfile r]
while { ! [eof $foo] } {
set line [gets $foo]
if {!$cwhere} {
puthelp "NOTICE $nick :$line"
} else {
puthelp "PRIVMSG $chan :$line"
}
}
}
# This sets the location of the file you want to be written out to someone in a msg
set dfile "/home/matt/eggdrop/scripts/servers.txt"
#sets the command it should go on off in a chan or so
set cmdd "!servers"
#this is where you set where the file should be printed out
#private = 0
#channel = 1
set dwhere 1
## don't edit below this line -----------------------------------
bind pub -|- $cmdd dumpfiled
proc dumpfiled {nick handle host chan text } {
global dfile dwhere
set foo [open $dfile r]
while { ! [eof $foo] } {
set line [gets $foo]
if {!$dwhere} {
puthelp "NOTICE $nick :$line"
} else {
puthelp "PRIVMSG $chan :$line"
}
}
}
would prefer to be able to specify which channel to bind the commands in, so i could add a new block with the same command say !url or anything else , to a specific channel, or group of channels.
any help greatly appreciated