Just have this little one that I am not to sure about. It does the first foreach right then packs it in
Code: Select all
foreach asus_nick [userlist] {
set asus_text "write $asus_nick"
set asus_file "$asus_nick\.db"
putlog "$asus(mfd) $asus_file $asus_text"
asus_file_write $asus(mfd) $asus_file $asus_text
}
asus_msg $idx " $asus(logo) User File Setup \002Completed\002." $asus(idx)
foreach asus_chan [channels] {
set asus_text "$asus(write) $asus_chan"
set asus_file "$asus_chan\.db"
putlog "$asus(mfd) $asus_file $asus_text"
asus_file_write $asus(mfd) $asus_file $asus_text
}
Code: Select all
proc asus_msg {who what where} {
global asus
if {$where == "msg"} {puthelp "PRIVMSG $who :$what"}
if {$where == "notc"} {puthelp "NOTICE $who :$what"}
if {$where == "idx"} {putdcc $who "$what"}
}
proc asus_file_write {where file text} {
global asus
set asus_file "[lindex [split $where] 0]/[lindex [split $file] 0]"
set asus_to [lindex [split $text] 0]
set asus_text [lrange [split $text] 1 end]
if {(![file exists $asus_file]) && $asus_to == ""} {
set asus_file_new [open $asus_file a+]
close $asus_file_new
}
if {(![file exists $asus_file]) && ($asus_to == "write")} {
set asus_file_new [open $asus_file w]
puts $asus file_new "$asus_text"
close $asus_file_new
} else {
set asus_file_write [open $asus_file w]
puts $asus_file_write "$asus_text"
close $asus_file_write
}
return
}
That is the debug that i am getting from my putlog and this error... No idea what is going on.. other than that it all works fine«+1:11am+» <Asustek> [01:15] /home/kissmine/Asustest/scripts/asustek Kissmine.db write Kissmine
«+1:11am+» <Asustek> [01:15] /home/kissmine/Asustest/scripts/asustek Hammie.db write Hammie
«+1:11am+» <Asustek> [01:15] /home/kissmine/Asustest/scripts/asustek TheDeadMan.db write TheDeadMan
«+1:11am+» <Asustek> [01:15] /home/kissmine/Asustest/scripts/asustek #kissmine.db write #kissmine
«+1:11am+» <Asustek> [01:15] error on listen: can't read "asus": variable is array
Thanx guys
------------
ThePope