开发者

Linebreak IRC protocol

开发者 https://www.devze.com 2023-03-28 04:34 出处:网络
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.

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 t开发者_Go百科hat 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 ?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号