0

在 python 中加入受密码保护的 IRC 频道的正确语法是什么?

通常是:

socket.send("JOIN " +channel+ "\r\n")
4

1 回答 1

2

来自 RFC 1459:

Command: JOIN
Parameters: <channel>{,<channel>} [<key>{,<key>}]

此外,您必须使用 CR-LF 终止您的行:

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.

所以是"JOIN " + channel + " " + key + "\r\n"

参考:

于 2013-06-30T14:58:45.463 回答