I have a list with N number of items and when i tell the script to post them to the screen i get only the first and last line, but when i replace puthelp,putserv with putlog i see that the list is correct, so i guess the problem is with the queueing of these functions.
Here is the procedure i've created:
Code: Select all
set maxrnd ""
bind pub * "!test" test
proc test { nick host hand chan args } {
global maxrnd
append args \n
append maxrnd $args
if { $args == "paste\n" } { # if the args are paste\n then display the list
for {set i 0} {$i < [ llength $maxrnd ] } {incr i} {
puthelp "PRIVMSG $chan : [lindex $maxrnd $i ]"
# putlog "PRIVMSG $chan : [lindex $maxrnd $i ]"
}
}
return 0
}
!test <blabla>
but when i write:
!test paste
it displays the list, or atleast it should be....
When i comment the puthelp line and uncomment the putlog line
i see in the bot dcc window that every row is displayed .... but with the puthelp command only the first and last one.
So my question is how do i fix this????????
