From 8ecfe1ae22cf3ce34f01c7d20f490704d4a25995 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Wed, 27 Aug 2014 09:12:19 +0100 Subject: [PATCH] Fix ship type lookups --- dropbot/bot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dropbot/bot.py b/dropbot/bot.py index a566d9a..c750519 100644 --- a/dropbot/bot.py +++ b/dropbot/bot.py @@ -501,8 +501,9 @@ class DropBot(ClientXMPP): for attk in kill['attackers']: alli_assoc[attk['allianceName']] += 1 if int(attk['characterID']) == char_id: - ship_types[attk['shipTypeID']] += 1 - + ship_type_id = int(attk['shipTypeID']) + if ship_type_id > 0: + ship_types[ship_type_id] += 1 if len(res) == 0: return '{} has had no kills in the last week'.format(char_name)