01 02 03 04 05 06 07 08 09 10 11 12
proc longtextout {text} { set text [split [string map {\n " "} $text]] set curpos 0 for {set x 1} {$x <= [llength $text]} {incr x} { if {[string length [join [lrange $text $curpos $x]]] > 400} { lappend curout [join [lrange $text $curpos [expr $x-1]]] set curpos $x } } if {$curpos != [expr [llength $text] - 1]} {lappend curout [join [lrange $text $curpos end]]} return $curout }
1
foreach curline [longtextout $mytext] {putmsg $chan $curline}