 
 DPASTE_API_URL = "http://dpaste.com/api/v2/"
 PASTEBIN_API_URL = "http://pastebin.com/api/api_post.php"
-SERVER_ERROR = "We are unable to process your request at this time due to a server error. Please try again later."
+
+DEF_SERVER_ERROR = "We are unable to process your request at this time due to a server error. Please try again later."
+DEF_CREDIT = "Generated by ClaudeBot's hubot-paste"
 
 class Paste
     constructor: (@msg) ->
 
     create: (err, link) ->
         if err
-            @msg.reply SERVER_ERROR
+            @msg.reply DEF_SERVER_ERROR
             return @msg.robot.logger.error err
         @msg.reply link
 
 class Dpaste extends Paste
     create: (text, expire = 1) ->
         data = "content=#{encodeURI(text)}&expiry_days=#{expire}"
-        data += "&poster=#{robot.name}&title=Generated%20by%20ClaudeBot%27s%20hubot-paste"
+        data += "&poster=#{@msg.robot.name}&title=#{encodeURI(DEF_CREDIT)}"
 
         @msg.http(DPASTE_API_URL)
             .header("content-type", "application/x-www-form-urlencoded")

#   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")
