mIRC Homepage
Posted By: UrbanPuppet Something to prevent excess-flood - 29/10/03 07:47 PM
I'm in the process of writing a socket bot, and I'd like if I could prevent excess-flood by only allowing X lines per second to be sent, and everything after should be in a buffer. I really have no idea how to accomplish this though.. Does anyone have any ideas?

Text in the buffer should be sent as soon as possible..

For example:

I want the bot to send:

PRIVMSG #channel :line 1
PRIVMSG #channel :line 2
PRIVMSG #channel :line 3

but, say I have %linespersec set to 2, it should send line 1 and line 2, and wait 1 second and send line 3 (that leaves one more message allowed to be sent within that second)
Posted By: cold Re: Something to prevent excess-flood - 29/10/03 07:55 PM
You might want to use /play for queued commands.
Posted By: UrbanPuppet Re: Something to prevent excess-flood - 29/10/03 07:59 PM
it doesnt look like i can prepend (is that even a word?) a command, like /sockwrite
Posted By: cold Re: Something to prevent excess-flood - 29/10/03 08:02 PM
You can, use the -a switch.
Posted By: UrbanPuppet Re: Something to prevent excess-flood - 29/10/03 08:07 PM
thanks, but I'm not having problems sending commands, i can do that fine, i dont know how to do the timing part..
Posted By: UrbanPuppet Re: Something to prevent excess-flood - 29/10/03 08:10 PM
nevermind, i understand now, thanks smile
© mIRC Discussion Forums