     else
       who = robot.brain.userForName who
 
-    userBadges = who.badges ?= []
+    userBadges = badges[who.id] ?= []
 
     if badgeName in badgeList
       userBadges.push ":#{badgeName}:"
       if who.name == msg.envelope.user.name
-        msg.reply "Congrats on earning the :#{badgeName}: badge!"
+        msg.reply "congrats on earning the :#{badgeName}: badge!"
       else
         msg.send "@#{who.name}: congrats on earning the :#{badgeName}: badge!"
     else

    else
      who = robot.brain.userForName who

    userBadges = who.badges ?= []
    you = if who? and who.name == msg.envelope.user.name then true else false
    whowhat = "#{if you then 'You have' else who.name + ' has'}"


]

module.exports = (robot) ->
  badges = {}

  robot.brain.on "loaded", ->
    badges = robot.brain.data.ingressBadges ?= {}
