           io.sockets.in('topStacks').emit 'topStack', stacks
 
     socket.on 'upvote', (id) ->
-      error =
-        attack: "window.location = 'https://www.google.com/search?q=dont+hack+me+bro'"
-      return socket.emit 'error', error if id?
+      return socket.emit 'error', attackError if id?
       unless socket.handshake.address in upvotes[id]
         upvotes[id].push socket.handshake.address
         db.findById id, (err, stack) ->

          msg: 'You Already Up-Voted This'

    socket.on 'dnvote', (id) ->
      error =
        attack: "window.location = 'https://www.google.com/search?q=dont+hack+me+bro'"
      return socket.emit 'error', error if id?
      unless socket.handshake.address in dnvotes[id]
        dnvotes[id].push socket.handshake.address
        db.findById id, (err, stack) ->

      req.end()

    socket.on 'share', (data) ->
      return socket.emit 'error', attackError unless data? and data.name? and data.packages? and data.upVote? and data.dnVote? and data.score?
      return socket.emit 'error', attackError unless data.upVote is 0 and data.dnVote is 0 and data.score is 0
      return socket.emit 'error', niceError unless String(data.name).length < 30
      db.create data, (err, stack) ->
        upvotes[stack._id] = []
        dnvotes[stack._id] = []
