 
 hours = {}
 timename = {}
+tnamelower = {}
 timepeople = {}
 hourstotal = {}
 

    robot.respond /hours ([a-zA-Z0-9_]*)/i, (msg) ->
        if robot.auth.hasRole(msg.envelope.user, ['admin', 'moderator'])
            timename = msg.match[1]
            hours[timename] ?= 0
            hourstotal = hours[timename] / 100

            msg.send timename + ' has watched for ' + hourstotal + ' hours!'
            return

        msg.send "Only mods can check the hours of others!"

    # Allows viewers to check their own hours watched.
    robot.respond /hours$/i, (msg) ->
        timename = "#{msg.envelope.user.name}"
        tnamelower = timename.toLowerCase()
        hours[tnamelower] ?= 0
        hourstotal = hours[tnamelower] / 100

        msg.send tnamelower + ", you have spent " + hourstotal + " in the channel!"

    #
    # We don’t need the following until it's fully
