Skip to content

Commit

Permalink
Merge branch 'patch-1' of https://github.com/joshbetz/hubot-irc
Browse files Browse the repository at this point in the history
  • Loading branch information
jgable committed Mar 11, 2013
2 parents bcd9664 + 378fc4c commit 839d924
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/irc.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ class IrcBot extends Adapter

bot.addListener 'pm', (nick, message) ->
console.log('Got private message from %s: %s', nick, message)

if process.env.HUBOT_IRC_PRIVATE
return

nameLength = options.nick.length
if message.slice(0, nameLength).toLowerCase() != options.nick.toLowerCase()
Expand All @@ -216,7 +219,9 @@ class IrcBot extends Adapter

bot.addListener 'invite', (channel, from) ->
console.log('%s invite you to join %s', from, channel)
bot.join channel

if not process.env.HUBOT_IRC_PRIVATE
bot.join channel

@bot = bot

Expand Down

0 comments on commit 839d924

Please sign in to comment.