Update DuplicateMessages.py

This commit is contained in:
AnthorNet 2017-12-28 11:06:28 +01:00 committed by GitHub
parent 6d670a27ee
commit e5123b99b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,7 @@ class DuplicateMessages(Thread):
# Prevent Docked event with small difference in distance from start
if message['message']['DistFromStarLS']:
message['message']['DistFromStarLS'] = int(message['message']['DistFromStarLS'])
message['message']['DistFromStarLS'] = round(message['message']['DistFromStarLS'])
message = simplejson.dumps(message, sort_keys=True) # Ensure most duplicate messages will get the same key
key = hashlib.sha256(message).hexdigest()