     self.robot.name = @options.name
 
     # Tell Hubot we're connected so it can load scripts
-    console.log "Successfully 'connected' as", self.robot.name
+    @log "Successfully 'connected' as", self.robot.name
     self.emit "connected"
 
   # Convenience HTTP Methods for sending data back to slack

HTTPS = require 'https'

class Slack extends Adapter
  send: (params, strings...) ->
    console.log "Sending message"

    user = @userFromParams(params)

    strings.forEach (str) =>
      # Escape this
      str = str.replace(/&/g, '&amp;')
      str = str.replace(/</g, '&lt;')
      str = str.replace(/>/g, '&gt;')

      # Linkify. We assume that the bot is well-behaved and
      # consistently sending links with the protocol part
      str = str.replace(/((\bhttp)\S+)/g, '<$1>')

      args = JSON.stringify({"channel": user.reply_to, "text": str, username: @robot.name})
      @post "/services/hooks/hubot", args

  reply: (params, strings...) ->
    console.log "Sending reply"

    user = @userFromParams(params)
    strings.forEach (str) =>


  topic: (params, strings...) ->
    # TODO: Set the topic

  escapeHtml: (string) ->
    string
      # Escape entities
      .replace(/&/g, '&amp;')
      .replace(/</g, '&lt;')
      .replace(/>/g, '&gt;')

      # Linkify. We assume that the bot is well-behaved and
      # consistently sending links with the protocol part
      .replace(/((\bhttp)\S+)/g, '<$1>')

  unescapeHtml: (string) ->
    string
      # Unescape entities
      .replace(/&amp;/g, '&')
      .replace(/&lt;/g, '<')
      .replace(/&gt;/g, '>')

      # Convert markup into plain url string.
      .replace(/<((\bhttps?)[^|]+)(\|(.*))+>/g, '$1')
      .replace(/<((\bhttps?)(.*))?>/g, '$1')


  userFromParams: (params) ->
    # hubot < 2.4.2: params = user
