diff --git a/src/irc.coffee b/src/irc.coffee index 0525289..3e65f68 100644 --- a/src/irc.coffee +++ b/src/irc.coffee @@ -39,12 +39,10 @@ class IrcBot extends Adapter unless target console.log "ERROR: Not sure who to send to. envelope=", envelope return - + + speak = if process.env.HUBOT_IRC_SEND_NOTICE_MODE? then "notice" else "say" for str in strings - if process.env.HUBOT_IRC_SEND_NOTICE_MODE? - @bot.notice target, str - else - @bot.say target, str + @bot[speak] target, str notice: (envelope, strings...) -> for str in strings