 
     teamNotify = brewing.dibs.length < dibsLimit
 
+    expiry = new Date (new Date()).getTime() + dibsDuration*1000
+
     claims = []
     for i in [1..dibsLimit]
       claims.push if (dibber = brewing.dibs[i-1])

# water = 3/16 * cups
# scoops = .75 * cups + 2

StatusEmoji = require('./status-emoji')

dibsLimit = process.env.HUBOT_COFFEE_DIBS_LIMIT || 6

freshPots = [
  "http://stream1.gifsoup.com/view6/3131142/chug-coffee-o.gif",

      else
        "Unclaimed!"

    threadMsg = threadedMsg(msg)
    threadMsg.send "#{if teamNotify then '@team: ' else ''}Fresh Pot!!! #{msg.random freshPots} " +
      ":coffee: Claims (valid until #{dateformat expiry, 'h:MM:ss tt'}):\n" +
      (" • ##{(parseInt index)+1}: #{claim}" for index, claim of claims).join("\n")


    if claims.length
      setTimeout ->
        threadMsg.send "Claims have expired!"
      , dibsDuration*1000

    brewing = {}

