         robot.respond /pastebin (.+)/i, (msg) ->
             service = new Pastebin msg
             service.create msg.match[1]
+    else
+        robot.logger.warning "Missing PASTEBIN_API_KEY in environment. Pastebin services will not be available."

#   Universal Paste API (Dpaste.com and Pastebin.com)
#
# Configuration:
#   
#
# Commands:
#   hubot dpaste <content> - Creates a new paste with <content> on Dpaste.com

    create: (text, expire = "1D") ->
        data = "api_dev_key=#{encodeURI(PASTEBIN_API_KEY)}&api_option=paste"
        data += "&api_paste_code=#{encodeURI(text)}&api_paste_expire_date=#{expire}"
        data += "&api_paste_name=#{encodeURI(DEF_CREDIT)}"

        @msg.http(PASTEBIN_API_URL)
            .header("content-type", "application/x-www-form-urlencoded")
