gdamjan / erlang-irc-bot

A simple extendable irc bot in Erlang
http://github.com/gdamjan/erlang-irc-bot/wiki
MIT License
80 stars 25 forks source link

handle 433 irc error (Nickname is already in use) #22

Closed gdamjan closed 13 years ago

gdamjan commented 13 years ago

Here's the log when this happened. The irc session was stuck, the bot tried to reconnect, but failed to register.

=ERROR REPORT==== 5-Oct-2010::00:43:28 ===
No activity for more than 180000 microseconds. Are we stuck?
Exit in online: <0.12322.0>
The stream was stoped!
OUT| NICK erlbot--
OUT| USER erlbot-- 8 * :An experimental Erlang IRC bot
 IN| :barjavel.freenode.net NOTICE * :*** Looking up your hostname...
 IN| :barjavel.freenode.net NOTICE * :*** Checking Ident
 IN| :barjavel.freenode.net NOTICE * :*** Found your hostname
 IN| :barjavel.freenode.net NOTICE * :*** No Ident response
 IN| :barjavel.freenode.net 433 * erlbot-- :Nickname is already in use.
FIXME[registering]: timeout
 IN| ERROR :Closing Link: legolas.on.net.mk (Connection timed out)
(ircbot@jeos)20>
=ERROR REPORT==== 5-Oct-2010::00:44:18 ===
Socket #Port<0.3742> closed [<0.12361.0>]
gdamjan commented 13 years ago

the nickserv plugin should handle the 433 error. the gen_fsm should handle the timeout on registering better.

gdamjan commented 13 years ago

resolved in e097172ba

I've put it in the gen_fsm for now. in the registering state the plugins are still not functional