alias addbuf {
window -h @buffer
aline @buffer $1-
if (!$timer(buffer)) flushbuffer
}
alias flushbuffer {
if ($line(@buffer,1)) {
$v1
dline @buffer 1
.timerbuffer -m 1 310 flushbuffer
}
else window -c @buffer
}
All you need to do is to add "addbuf" in front of the commands you way to add to the buffer. It will automatically spam the first line instantly, and rest with 350 ms delay (100 = 35 seconds, just to be safe) after that.
It adds all of them to the same buffer, no matter what the target channel/whatever is. It wouldn't be hard to create a buffer for each channel.
Here's an example:
on *:text:!test:#: {
var %x = 20
while (%x) {
addbuf msg # TEST: line %x
dec %x
}
}
Just to note: it has no limits on what commands it'll execute, so you don't want to let random people add anything to it. You can get around that by making sure the command always starts with "msg #" or something.