Code: Select all
package require fileutil
bind pub o|o !techtree techtree
set basedir /home/mutombo/eggdrop/scripts/tt/
proc techtree {nick uhost hand chan args} {
global basedir
if {[string match physik [string tolower $args]]} {fileserv $nick $args}
if {[string match chemie [string tolower $args]]} {fileserv $nick $args}
if {[string match biologie [string tolower $args]]} {fileserv $nick $args}
if {[string match mechanik [string tolower $args]]} {fileserv $nick $args}
if {[string match architektur [string tolower $args]]} {fileserv $nick $args}
if {[string match wirtschaft [string tolower $args]]} {fileserv $nick $args}
if {[string match taktik [string tolower $args]]} {fileserv $nick $args} else {
putquick "PRIVMSG $nick :\0039,1 \[BORG\] Techtree interface .... \003"
putquick "PRIVMSG $nick :\0039,1 Connecting ... \003"
putquick "PRIVMSG $nick :\0039,1 Choose Subsection : physik, chemie, biologie, mechanik, architektur, wirtschaft, taktik \003"
}
}
proc fileserv {nick section} {
global basedir
::fileutil::foreachLine line $basedir$section.txt {putquick "PRIVMSG $nick :\0039,1 $line \003"}
}
this is working, but as long as the bot puts out the file(sometimes over 20 lines) it doesnt respond to anything else.
No ping or dcc is working, but i can see that the bot gets the pingrequest in time, but he starts first answering when the tclscript is finished.
could someone give me some advice here waht im doing wrong ?
greetings mutombo