IRC机器人:错误 - 注册超时 [英] IRC Bot: Error - Registration Timeout

查看:99
本文介绍了IRC机器人:错误 - 注册超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做的C.一个简单的IRC机器人,我终于得到了机器人连接和接收信息。我的code应该是发为好,但如果没有发送任何服务器行事。当机器人连接,我收到这样的:

I'm making a simple IRC Bot in C. And I finally got the bot connecting and receiving information. My code is supposed to be sending as well, but the server is acting as if it is not sending anything. When The bot connects, I receive this:

收到:roc.esper.net注意AUTH
  :***看你的主机名...

Recieved: :roc.esper.net NOTICE AUTH :*** Looking up your hostname...

收到:roc.esper.net注意AUTH
  :***找到你的主机名

Recieved: :roc.esper.net NOTICE AUTH :*** Found your hostname

而此时我的code发送这样的:

at which point my code sends this:

发送:NICK粘粘

发送:用户咕* *:咕

Sent: USER Goo * * :Goo

我使用Wireshark的,这是你应该后的初始连接发送注册决定的。但是,我不知道该数据实际发送或可能是无效的不知何故?由于约30秒后一无所获我也收到这样的:

I determined from using wireshark that this is the registration you should send after the initial connect. However, I'm not sure the data is actually sending or maybe it is invalid somehow? Because after about 30 seconds of nothing i also receive this:

收到:ERROR:关闭链接:
  c-68-33-143-182.hsd1.md.comcast.net
  (注册超时)

Recieved: ERROR :Closing Link: c-68-33-143-182.hsd1.md.comcast.net (Registration timed out)

然后我的程序关闭。

别人是否了解在IRC的程序化认证/注册程序什么?还是其他任何人有任何有益的想法呢?

Does anyone else know anything about the programatic auth/registration processes in irc? Or does anyone else have any helpful ideas at all?

感谢

**编辑**固定。我需要的是在每行的末尾发送行终止。 \\ r \\ n

** EDIT ** Fixed. I needed to be sending line terminators at the end of each line. \r\n

推荐答案

Telnet用于roc.esper.net:

Telnet for roc.esper.net:

~$ telnet roc.esper.net 6667
Trying 198.247.173.216...
Connected to roc.esper.net.
Escape character is '^]'.
:roc.esper.net NOTICE AUTH :*** Looking up your hostname...
:roc.esper.net NOTICE AUTH :*** Found your hostname
NICK Goo
USER Goo * * :Goo
PING :268966433
PONG :268966433

NICK,USER和PONG被我送。在此之后,欢迎讯息如下:

NICK, USER and PONG were send by me. After that, welcome message follows:

:roc.esper.net 001 Goo :Welcome to the EsperNet Internet Relay Chat Network Goo
:roc.esper.net 002 Goo :Your host is roc.esper.net[198.247.173.216/6667], running version esphyb-1.0.1

等等......

And so on...

所以,再次检查乒乓,如果你的邮件发送正确(尤其是CR / LF或'\\ n'月底)。

So, again, check for PING-PONG and if your messages are sent correctly (especially CR/LF or '\n' at end).

顺便说一句,我得到注册超时如果我不发送任何消息,即使庞丢失,但一旦我回答平,有没有超时了(30至少不会秒后)

By the way, I get "registration timed out" if I don't send any of the messages, even if PONG is missing, but once I answered PING, there is no timeout anymore (at least not after 30 seconds).

这篇关于IRC机器人:错误 - 注册超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆