nandub / hubot-irc

IRC adapter for Hubot
MIT License
299 stars 128 forks source link

Hubot doesn't join channels if NICKSERV_PASSWORD is set #162

Closed cytec closed 7 years ago

cytec commented 8 years ago

If im setting HUBOT_IRC_NICKSERV_PASSWORD hubot authenticates with nicserv properly but doesn't join any channels afterwards.

changing this line https://github.com/nandub/hubot-irc/blob/master/src/irc.coffee#L187 from client_options['channels'] = options.rooms unless options.nickpass to client_options['channels'] = options.rooms fixes this for me

chrisdotcode commented 7 years ago

Are you forgetting about setting HUBOT_IRC_ROOMS as well?

Closing for now. Will re-open if it's again an issue.

sam-mark commented 3 years ago

Same issue here but with SASL lol

so this solution is best for me too

changing this line https://github.com/nandub/hubot-irc/blob/master/src/irc.coffee#L187 from client_options['channels'] = options.rooms unless options.nickpass to client_options['channels'] = options.rooms fixes this for me

than

      bot.addListener 'notice', (from, to, text) ->
        if from is 'NickServ' and text.toLowerCase().indexOf('identify') isnt -1
          bot.say 'NickServ', "identify #{identify_args}"     
        else if options.nickpass and from is 'NickServ' and
                (text.indexOf('Password accepted') isnt -1 or
                 text.indexOf('identified') isnt -1)
          for room in options.rooms
            @join room

My solution for SASL


        else if from is 'SaslServ' and text.indexOf('Last login from') isnt -1          
          for room in options.rooms
            @join room