i have the following problem:
i want to open a mail file, and read out from line 11 till the end and put line after line in a channel...
i tried hours but this [censored] does not work
here is the proc:
Code: Select all
proc readmail {as df gh hj rt} {
global basicfile lastmail lastmailid mailname tmpfile tmpmail
set foo [open $tmpmail r]
set line [read $foo]
foreach line [split $line "\n"] {
set mailid2 [lindex $line [expr [llength $line] -10]]
set mailname1 [lindex $line [expr [llength $line] -1]]
if { $mailid2 == $rt } {
puthelp "privmsg #bla :$mailid2 $mailname1"
## maildatei oeffnen ##
set mailfile2 "/Maildir/cur/$mailname1:2,"
set foo [open $mailfile2 r]
set line [read -nonewline $foo]
set lines [split $line "\n"]
putserv "privmsg #bla :$lines"
}}
catch {close $foo}
catch {close $foo}
}
sorry for my bad english