   robot.respond /drush (.*)$/i, (msg) ->
     msg.send "drush fired!"
     drush.execute(msg)
-
-#module.exports = (robot) ->
-#  robot.respond /drush sa$/i, (msg) ->
-#    #    if not process.env.DRUSH_UID?
-#    # msg.send "DRUSH_UID is not set. Cannot complete this action."
-#    #  return
-#
-#    sitelist = 'Site Aliases Available: \n'
-#    sitealias = spawn("drush", ["sa"])
-#    sitealias.stdout.on "data", (data) ->
-#      sitelist = sitelist + data
-#
-#    sitealias.on "exit", (code) ->
-#      msg.send sitelist
-#      msg.send 'sa command complete.'
-#
-#  robot.respond /drush cc (.*)$/i, (msg) ->
-#    ccout = ''
-#    clearcache = spawn("drush", [msg.match[1], "cc", "all"])
-#    msg.send "This may take a minute, please be patient..."
-#    clearcache.stdout.on "data", (data) ->
-#      ccout = ccout + data
-#
-#    clearcache.stderr.on "data", (data) ->
-#      ccout = ccout + data
-#
-#    clearcache.on "exit", (code) ->
-#      if code is 0
-#        msg.send ccout
-#        msg.send "--== command complete ==--"
-#      else
-#        msg.send "Drush experienced and error."
-#
-#  robot.respond /drush pml (.*)$/i, (msg) ->
-#    pmlOut = '\n'
-#    pml = spawn("drush", [msg.match[1], "pml", "--status=enabled", "--no-core"])
-#    pml.stdout.on "data", (data) ->
-#      pmlOut = pmlOut + data
-#    pml.stderr.on "data", (data) ->
-#      pmlOut = pmlOut + data
-#    pml.on "exit", (code) ->
-#      msg.send pmlOut
-#      msg.send "--== command complete ==--"
-

      command_suff = site_alias
      site_alias = ''
    command = "drush_" + command_suff
    if typeof commands[command] is "function"
      return (
        cmnd: command
        alias: site_alias
        args: extra_args
      )
      command
    else
      `undefined`


  # run the update script upon construction
  update_aliases()

  allowed_commands =
    drush_sa: (msg, command) ->
      if command.args.indexOf('--update-aliases') is -1
        msg.send "If this list is empty or has unexpected results update aliases ('drush sa --update-aliases')."
