You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My IRC bot is unable to reconnect to my channel because it's invite only, and
when it tries to reconnect after a network failure node-irc changes the
nickname. Here's the log, notice when it changes the nick from fallbot to fallbot1:
13 May 12:36:06 - Unhandled message: { command: 'ERROR',
rawCommand: 'ERROR',
commandType: 'normal',
args: [ 'Closing Link: rrcs-108-178-74-64.sw.biz.rr.com (Ping timeout: 255 seconds)' ] }
13 May 12:36:06 - Connection got "close" event
13 May 12:36:06 - Disconnected: reconnecting
13 May 12:36:06 - Waiting 2000ms before retrying
13 May 12:36:06 - Connection got "end" event
13 May 12:36:06 - SEND: PONG zelazny.freenode.net
13 May 12:36:09 - Sending irc NICK/USER
13 May 12:36:09 - SEND: NICK fallbot
13 May 12:36:10 - SEND: USER nodebot 8 * :nodeJS IRC client
13 May 12:36:16 - SEND: NICK fallbot1
13 May 12:36:17 - Unhandled message: { prefix: 'leguin.freenode.net',
server: 'leguin.freenode.net',
command: 'rpl_luserunknown',
rawCommand: '253',
commandType: 'reply',
args: [ 'fallbot1', '21', 'unknown connection(s)' ] }
13 May 12:36:17 - MODE:fallbot1 sets mode: +Zi
I think that after reconnection, node-irc gets an err_nicknameinuse command
and ends up here:
Which makes sense, node-irc is making it's best effort to connect. But I don't
see how the err_nicknameinuse could be happening, since I'm fairly certain
that no one is logging into freenode and squatting on the fallbot handle in
that sub-second window (this isn't a one-time thing, it happens somewhat
regularly).
I suspect that my bot is detecting that it is not connected to freenode before
freenode notices. So when the bot tries to reconnect, freenode says the nick is
still in use.
Is there a way to prevent this? Can my bot fix this by handling that 'ERROR'
command? Or is this something that node-irc should handle?
The text was updated successfully, but these errors were encountered:
This is something you would need to do, as your problem is server specific. The problem though is that your old client hasn't pinged out yet. When the network sends you the next PING request and that client fails to send back PONG, then the nickname will become available.
Only thing I could recommend doing would be to make sure you register the nick with the nickserv and then use the nickserv ghost command when you get
you should add something like client.send("nickserv", "ghost fallbot password")
My IRC bot is unable to reconnect to my channel because it's invite only, and
when it tries to reconnect after a network failure node-irc changes the
nickname. Here's the log, notice when it changes the nick from
fallbot
tofallbot1
:I think that after reconnection, node-irc gets an
err_nicknameinuse
commandand ends up here:
Which makes sense, node-irc is making it's best effort to connect. But I don't
see how the
err_nicknameinuse
could be happening, since I'm fairly certainthat no one is logging into freenode and squatting on the
fallbot
handle inthat sub-second window (this isn't a one-time thing, it happens somewhat
regularly).
I suspect that my bot is detecting that it is not connected to freenode before
freenode notices. So when the bot tries to reconnect, freenode says the nick is
still in use.
Is there a way to prevent this? Can my bot fix this by handling that 'ERROR'
command? Or is this something that node-irc should handle?
The text was updated successfully, but these errors were encountered: