From e2df065cc34ec721e3d81d566b124fd0a1fa8ba8 Mon Sep 17 00:00:00 2001 From: Daniel Schauenberg Date: Wed, 30 Nov 2011 12:23:21 +0100 Subject: [PATCH] fix room join for freenode channels I had this problem that hubot wouldn't join rooms and just idled connected to the freenode servers. I tracked it down to the `NOTICE` message parsing. The freenode servers would not send 'Password accepted' but rather something like 'You are now identified for ...'. I added a condition to take that into account. --- src/irc.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/irc.coffee b/src/irc.coffee index 6ce8ab5..22f5a6a 100644 --- a/src/irc.coffee +++ b/src/irc.coffee @@ -61,7 +61,9 @@ class IrcBot extends Adapter bot.addListener 'notice', (from, to, text) -> if from is 'NickServ' and text.indexOf('registered') isnt -1 bot.say 'NickServ', "identify #{options.nickpass}" - else if options.nickpass and from is 'NickServ' and text.indexOf('Password accepted') isnt -1 + 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