again here i am XD
I would like to make the line spit it out in an array, so that i can use the things that are splitted separately<Way2Death> uhm, i did this but i get invalid command name lassign
[17:50:04] <Way2Death> set numqdata [split $line ":"] lassign $numqdata \ qdatanum qdatatext
[17:50:18] <Way2Death> lassgin is on another line
[17:50:37] <Way2Death> and qdatanum qdatatext are together on another line
the txt file contains:
and so on..1:Hello
2:Again hello
3:Bla
This is the whole thing:
proc qot_src {nick uhost hand chan rest} {
global qot
set checked [check_string $rest]
if {[qot_flood $nick $uhost]} {return 0}
set qot_src(file) "results-$nick-$rest.txt"
putquick "PRIVMSG $nick : $qot_src(file) $nick "
# Slurp up the data file
set fp [open $qot_src(file) r]
set data [read $fp]
close $fp
set data [split $data "\n"]
foreach line $data {
if { $line=="" } {
set mythin "lol"
} else {
set numqdata [split $line ":"]
putquick "PRIVMSG $chan :Quote $line"
}
}
exec grep -i -n "$checked" $qot(file) > $qot_src(file)
exec rm -f $qot_src(file)
putcmdlog "<<$nick>> !$hand! Searched for a quote in $chan."
return
}