mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2003
Posts: 19
U
Pikka bird
OP Offline
Pikka bird
U
Joined: Jun 2003
Posts: 19
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)

Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
You might want to use /play for queued commands.


* cold edits his posts 24/7
Joined: Jun 2003
Posts: 19
U
Pikka bird
OP Offline
Pikka bird
U
Joined: Jun 2003
Posts: 19
it doesnt look like i can prepend (is that even a word?) a command, like /sockwrite

Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
You can, use the -a switch.


* cold edits his posts 24/7
Joined: Jun 2003
Posts: 19
U
Pikka bird
OP Offline
Pikka bird
U
Joined: Jun 2003
Posts: 19
thanks, but I'm not having problems sending commands, i can do that fine, i dont know how to do the timing part..

Joined: Jun 2003
Posts: 19
U
Pikka bird
OP Offline
Pikka bird
U
Joined: Jun 2003
Posts: 19
nevermind, i understand now, thanks smile


Link Copied to Clipboard