X-Fusion is indeed correct, however, mine was a modification off of Petertje's code. Here is the snipplet...
;Peter's code, modified abit
alias ss {
inc %pss | hadd -m slowsend %pss $1-
var %l = 1 | while ($var(%ssend.*,%l)) { var %i = $($ifmatch,2) | if ($len(%i) < 900) { break } | inc %l }
set -e %ssend. [ $+ [ $(%l,2) ] ] $addtok(%ssend. [ $+ [ $(%l,2) ] ],%pss,32)
if (!$timer(slowsend)) .timerslowsend -m 1 300 gosend
}
alias gosend {
var %c = $gettok($var(%ssend.*,1),2,46) , %item = $gettok(%ssend. [ $+ [ $(%c,2) ] ],1,32) | %ssend. [ $+ [ $(%c,2) ] ] = $deltok(%ssend. [ $+ [ $(%c,2) ] ],1,32)
$hget(slowsend,%item) | hdel slowsend %item
if (!%ssend. [ $+ [ $(%c,2) ] ]) unset %ssend. [ $+ [ $(%c,2) ] ]
if ($var(%ssend.*,1)) .timerslowsend -m 1 300 gosend
else unset %ssend.* %pss
}
Simply add it to the remotes file, then with any command you wish to "buffer", put "ss" in front of it, and it will buffer the information with a 300 millisecond gap between sends. This should be enough to stop any flooding from occurring.
So applying my code to your code you get (making sure you add the above snipplet into remotes)...
on admin:TEXT:readusergate:#:{
var %handle = handle $+ $ticks, %file = user.txt , %l = $lines(%file) , %i = 1
if (!%l) { msg # There is no Message to read %file . }
else {
while (%i <= %l) { ss msg # $read(%file,%i) | inc %i }
}
}
And just to remain unbiased, applying travis' method (as it works for file reads only, i believe)...
on admin:TEXT:readusergate:#:{
var %handle = handle $+ $ticks, %file = user.txt
if (!$lines(%file)) { msg # There is no Message to read %file . }
else play # %file 300
}
With the play command, "300" indiciates the delay in milliseconds, so if you need to slow it down, then do so. But like i said, it only works with file reads and buffer sending them. My snipplet provided in the first option allows you to buffer ANYTHING. Though, writing to a file, and "playing" the file, it will do pretty much the same job, but you just need to know how to code it correctly.
Have fun...?