4

I've written an IRC bot in java, but I am having the following problem : I have a help function that returns all the functions of bots (usage, example,...) to a user in private message.

The problem is that if I send this line by line, messages get queued, and it can take up to 10 seconds to send one help request.

Now I solved this by putting all the help functions in one message, but everything of course is put on 1 line. This is negative for readability.

Is there a way to format messages using the irc protocol and especially is there a character for linebreak ? (/n from java does not work)

And if there is no such option, what would the best way be to make it more readable ?

Lucas Kauffman
  • 6,789
  • 15
  • 60
  • 86

1 Answers1

5

This is not possible. From the IRC RFC 1459:

IRC messages are always lines of characters terminated with a CR-LF
(Carriage Return - Line Feed) pair, and these messages shall not
exceed 512 characters in length, counting all characters including
the trailing CR-LF.

I have never seen a message in IRC with a linebreak in it.

Jacob
  • 41,721
  • 6
  • 79
  • 81
  • 1
    I would try to add a small delay between messages, so that you don't trigger a server-side slow down. – Jacob Aug 12 '11 at 11:40