Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #247 from franc/master
If Hubot is run with a different name, help displays the instance name.
  • Loading branch information
atmos committed Feb 20, 2012
2 parents 6c7a5ae + 57f5f09 commit 65ce16a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/scripts/help.coffee
Expand Up @@ -10,5 +10,7 @@ module.exports = (robot) ->
cmds = robot.helpCommands()
if msg.match[1]
cmds = cmds.filter (cmd) -> cmd.match(new RegExp(msg.match[1]))
msg.send cmds.join("\n")

emit = cmds.join("\n")
unless robot.name is 'Hubot'
emit = emit.replace(/(H|h)ubot/g, robot.name)
msg.send emit

0 comments on commit 65ce16a

Please sign in to comment.