proc main {nick host hand chan rest} {
global opfile
set logfile [open $opfile(list) r]
set lines [split [read -nonewline $logfile] "/n"]
set totlines [llength $lines]
set fp [open $opfile(final) a]
set num 7
while {$num <= $totlines} {
set lines [linsert $lines $num $opfile(insert)]
puts $fp [join $lines "\n"]
set num [expr {$num + 5}]
}
close $fp
close $logfile
}