I find it very hard to figure out what the "real thing" would be. The code you posted is not only confusing, but riddled with bugs. All I've gathered is that you are trying to use "DMH Mailbox messaging"?
First off, you have a while-loop that will run as long as $a (the first list item of the recieved message) is smaller than $b, which is increased for each iteration of the loop. Hence you have a possible infinite loop.
Next, you use linsert with $a as list, and $b as index, yet you fail to supply an entity to add, causing a fatal error.
Finally, assuming those two items were fixed, you'd still end up writing the same line over and over, or possibly with added content for each iteration of the loop.
If you are working with a tcl-shell (tclsh or similar), use something like this to simply print the contents of the list:
Code: Select all
foreach sublist $mbxmsg {
puts $sublist
}
(With eggdrop, you'd simply replace puts with putlog to send the output to the log, or puthelp to build a command to send to the irc-server...)