             return
 
     # Enter an open raffle if you have enough points
-    # robot.respond /ticket$/i, (msg) ->
-    #     username = "#{msg.envelope.user.name}"
-    #     points[username] ?= 0
-    #
-    #     if points[username] >= cost and raffle is on and entered[username] is false
-    #         entered[username] = true
-    #         points[username] -= cost
-    #         bought.push(username)
-    #         save(robot)
-    #         msg.send "Test: raffle entered."
-    #         return
-
-    # Enter an open raffle if you have enough points
     robot.respond /ticket$/i, (msg) ->
         username = "#{msg.envelope.user.name}"
         points[username] ?= 0

                msg.send "Test: Seems you're already in the raffle."
            return

    # Check entry values for testing
    robot.respond /entry ([a-zA-Z0-9_]*)/i, (msg) ->
        if robot.auth.hasRole(msg.envelope.user, ['admin'])
            username = msg.match[1].toLowerCase()
            entry = bought.indexOf(username)
            msg.send entry
            return

    # Close raffle, drawn winner and reset.
    robot.respond /raffle draw$/i, (msg) ->
        if robot.auth.hasRole(msg.envelope.user, ['admin'])
            raffle = off
            # entered[username] = false
            bought.length = 0
            save(robot)
            msg.send "The raffle is now closed. A winner will be announced in this message once finished."
            return

    # Check entrants. Temp command for testing

tickets = []
raffle = off
cost = 0
bought = []

save = (robot) ->
