from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound\r
from xonstat.elo import process_elos\r
from xonstat.models import *\r
-from xonstat.util import strip_colors, qfont_decode, verify_request\r
+from xonstat.util import strip_colors, qfont_decode, verify_request, weapon_map\r
\r
\r
log = logging.getLogger(__name__)\r
matched = re.search("acc-(.*?)-cnt-fired", key)\r
if matched:\r
weapon_cd = matched.group(1)\r
+\r
+ # Weapon names changed for 0.8. We'll convert the old\r
+ # ones to use the new scheme as well.\r
+ weapon_cd = weapon_map.get(weapon_cd, weapon_cd)\r
+\r
seq = Sequence('player_weapon_stats_player_weapon_stats_id_seq')\r
pwstat_id = session.execute(seq)\r
pwstat = PlayerWeaponStat()\r