Python IRCBot Quakenet无标识响应

2024-04-25 19:48:59 发布

您现在位置:Python中文网/ 问答频道 /正文

我在将Python IRC Bot连接到Quakenet时遇到一些问题。
其他网络(如freenode或euirc)运行良好。
我的irc库代码:https://github.com/Thor77/PythonIrcBot/blob/master/irc.py
我的机器人程序的输出:

b'>>PASS somepassword'
b'>>NICK Thor2'
b'>>USER Thor2 Thor2 Thor2 :Thor2'
b'<<NOTICE AUTH :*** Looking up your hostname\r\n'
b'<<NOTICE AUTH :*** Checking Ident\r\nNOTICE AUTH :*** No ident response\r\nPING :3048259664\r\nNOTICE AUTH :*** Found your hostname\r\n'
b'<<:protectglobal.uk.quakenet.org 513 Thor2 :Your client may not be compatible with this server.\r\n:protectglobal.uk.quakenet.org 513 Thor2 :Compatible clients are available at ftp://ftp.undernet.org/pub/irc/clients\r\nERROR :Closing Link: Thor2 by protectglobal.uk.quakenet.org (Registration Timeout)\r\n'

Tags: orgauthyourircbotftphostnamenotice
1条回答
网友
1楼 · 发布于 2024-04-25 19:48:59

解决办法是, 我需要对阿平做出回应, 在尼克留言后。在

self._send('PASS somepassword')
    self._send('NICK ' + nick)
    self._read() # reads messages from server, find ping, send pong
    self._send('USER %s %s %s :%s %s' % (nick, nick, nick, nick, nick[::-1]))

相关问题 更多 >