   # robot.logger.info "sq: sending virustotal request for #{url}"
   virustotal.getUrlReport url, (err, res) ->
     if err
-      msgout = "Virus total: error: `#{err.json.verbose_msg}`."
+      msgout = "#{modulename}: error: `#{err.json.verbose_msg}`."
       robot.logger.info "#{msgout} [#{msg.envelope.user.name}]"
       return robot.send {room: msg.envelope.user.name}, msgout
 

queueUrlReport = (robot, msg, url) ->
  ms = Date.now()
  if sq.length >= maxRequestsPerInterval
    msgout = "Max requests per interval (#{maxRequestsPerInterval}) reached. Your request will be serviced as soon as possible.  Window + Queue: #{sq.length}."
    robot.send {room: msg.envelope.user.name}, msgout
  sq.push { whenqueued: ms, sent: false, robot: robot, msg: msg, url: url }
  # robot.logger.debug "sq: { whenqueued: #{ms}, url: #{url} }"

module.exports = (robot) ->

  unless process.env.HUBOT_VIRUSTOTAL_API?
    robot.logger.warning "#{modulename}: environment variable HUBOT_VIRUSTOTAL_API not set."
  else
    virustotal.setKey(process.env.HUBOT_VIRUSTOTAL_API)

