-@PendingTrust = new Meteor.Collection "pendtrust"
 Fiber = Npm.require 'fibers'
 
 ###

      host = @request.connection.remoteAddress
      trusted = @request.headers["eve_trusted"] is "Yes"
      hostHash = @request.headers["ident"]
      trustStatus = PendingTrust.findOne({ident: hostHash})
      if !trustStatus?
        trustStatus = {ident: hostHash, status: trusted}
        trustStatus._id = PendingTrust.insert(trustStatus)
      if trustStatus.status isnt trusted
        console.log "user "+(if trusted then @request.headers["eve_charname"] else hostHash)+" is now "+(if trusted then "trusted" else "not trusted")
        trustStatus.status = trusted
        PendingTrust.update({_id: trustStatus._id}, {$set: {status: trusted}})
      @response.writeHead 200, {'Content-Type': 'text/html'}
      @response.end ""+hostHash


###

#remove temp stuff on start
TrustStatus.remove({})

Meteor.publish "trust", ()->
  TrustStatus.find({})

Meteor.publish "characters", (hostHash)->
  Characters.find({hostid: hostHash})
