A Thread which is responsible for sending messages to the IRC server.
Messages are obtained from the outgoing message queue and sent
immediately if possible. If there is a flood of messages, then to
avoid getting kicked from a channel, we put a small delay between
each one.
OutputThread(PircBot bot,
Queue outQueue)
Constructs an OutputThread for the underlying PircBot.
Method Summary
void
run()
This method starts the Thread consuming from the outgoing message
Queue and sending lines to the server.
static void
sendRawLine(PircBot bot,
BufferedWriter writer,
String line)
A static method to write a line to a BufferedWriter and then pass
the line to the log method of the supplied PircBot instance.
Constructs an OutputThread for the underlying PircBot. All messages
sent to the IRC server are sent by this OutputThread to avoid hammering
the server. Messages are sent immediately if possible. If there are
multiple messages queued, then there is a delay imposed.
Parameters:
bot - The underlying PircBot instance.
outQueue - The Queue from which we will obtain our messages.