borrow code from hubot-irc