TwitchPlugin.throttleline

Takes one or more lines from the passed buffer and sends them to the server as whispers.

Sends to the server in a throttled fashion, based on a simple y = k*x + m graph.

This is so we don't get kicked by the server for spamming, if a lot of lines are to be sent at once.

class TwitchPlugin
package
throttleline
(
Buffer
)
(
ref Buffer buffer
,
const bool immediate = false
)

Parameters

buffer Buffer

Buffer instance.

immediate bool

Whether or not the line should just be sent straight away, ignoring throttling.

Return Value

Type: auto

A double of the the time in seconds remaining until the next message may be sent. If 0.0, the buffer was emptied.

See Also