irc bot for announcing rss/atom feeds (http://hackage.haskell.org/package/rss2irc)

#3can't connect to IRC (connection timed out)

I tried to connect to IRC but failed (tried a different network too, similar result):

$ rss2irc --debug-irc --debug-feed "http://hackage.haskell.org/recent.rss" irc.freenode.net/claudetest/clauderssbot
2016-03-05 14:42:45 GMT: clauderssbot connecting to irc.freenode.net, channel #claudetest
2016-03-05 14:42:45 GMT: ->clauderssbot
2016-03-05 14:42:45 GMT: ->rss2irc feed announcer
2016-03-05 14:42:45 GMT: <-:sendak.freenode.net NOTICE * :*** Looking up your hostname...
2016-03-05 14:42:45 GMT: <-:sendak.freenode.net NOTICE * :*** Checking Ident
2016-03-05 14:42:46 GMT: <-:sendak.freenode.net NOTICE * :*** Couldn&#39;t look up your hostname
2016-03-05 14:42:52 GMT: <-:sendak.freenode.net NOTICE * :*** No Ident response
2016-03-05 14:43:20 GMT: <-ERROR :Closing Link: 127.0.0.1 (Connection timed out)

2016-03-05 14:43:20 GMT: IRC error (ERROR :Closing Link: 127.0.0.1 (Connection timed out))

rss2irc version from darcs from around a week ago

  • I reproduced this once, but then it worked normally. Perhaps it's related to "Couldn't look up your hostname" ? My successful connects show:

    ...
    2016-03-05 07:50:29 PST: ->USER rss2irc 0 * :rss2irc feed announcer
    2016-03-05 07:50:29 PST: <-:holmes.freenode.net NOTICE * :*** Looking up your hostname...
    2016-03-05 07:50:29 PST: <-:holmes.freenode.net NOTICE * :*** Checking Ident
    2016-03-05 07:50:29 PST: <-:holmes.freenode.net NOTICE * :*** Found your hostname
    2016-03-05 07:50:40 PST: <-:holmes.freenode.net NOTICE * :*** No Ident response
    2016-03-05 07:50:40 PST: <-:holmes.freenode.net 001 smtestbot :Welcome to the freenode Internet Relay Chat Network smtestbot
    ...
  • Or not. Side note: http://www.avianbonesyndrome.com/2010/07/19/speed-up-connections-to-irc-servers is interesting on speeding up this step.

  • I didn't see this line, which looks more like an IRC message than what I saw...

    2016-03-05 07:50:29 PST: ->USER rss2irc 0 * :rss2irc feed announcer

    Did you specify any extra command line arguments to make this happen like this?

  • --debug-irc. Here's a more complete paste for reference, showing the outgoing NICK/USER/JOIN messages:

    $ rss2irc --debug-irc --debug-feed http://hackage.haskell.org/recent.rss irc.freenode.net/somechannel/smtestbot
    2016-03-05 07:50:29 PST: smtestbot connecting to irc.freenode.net, channel #somechannel
    2016-03-05 07:50:29 PST: ->NICK smtestbot
    2016-03-05 07:50:29 PST: ->USER rss2irc 0 * :rss2irc feed announcer
    2016-03-05 07:50:29 PST: <-:holmes.freenode.net NOTICE * :*** Looking up your hostname...
    2016-03-05 07:50:29 PST: <-:holmes.freenode.net NOTICE * :*** Checking Ident
    2016-03-05 07:50:29 PST: <-:holmes.freenode.net NOTICE * :*** Found your hostname
    2016-03-05 07:50:40 PST: <-:holmes.freenode.net NOTICE * :*** No Ident response
    2016-03-05 07:50:40 PST: <-:holmes.freenode.net 001 smtestbot :Welcome to the freenode Internet Relay Chat Network smtestbot
    2016-03-05 07:50:40 PST: ->JOIN #smtest
    2016-03-05 07:50:40 PST: connected.
    2016-03-05 07:50:40 PST: Polling http://hackage.haskell.org/recent.rss every 5 minutes
    2016-03-05 07:50:40 PST: <-:holmes.freenode.net 002 smtestbot :Your host is holmes.freenode.net[83.170.73.249/6667], running version ircd-seven-1.1.3
    2016-03-05 07:50:40 PST: <-:holmes.freenode.net 003 smtestbot :This server was created Wed Jan 20 2016 at 23:42:23 UTC
    ...
  • I fixed it, the code in HEAD was plain wrong afaict so I reverted it to be more like what it was before the last changes touched those lines

    http://hub.darcs.net/claude/rss2irc/patch/b84582c105ed28dfd9fdf5def0228d5e90a1a2a7 (this patch also wibbles some UTF-8 bits in the IRC layer)

  • Great! Would you mind separating the connect and encoding fixes into separate patches.