From f5b086a5c35f73b3fb7b3cbdd49999cb6e2f1dae Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Wed, 14 Dec 2011 22:05:50 -0500 Subject: [PATCH] Add support for the not-yet-created "duel" gametype. --- xonstat/views/submission.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xonstat/views/submission.py b/xonstat/views/submission.py index 9d82aa1..c0e5a51 100755 --- a/xonstat/views/submission.py +++ b/xonstat/views/submission.py @@ -525,6 +525,12 @@ def stats_submit(request): log.debug("ERROR: Not enough real players") raise pyramid.httpexceptions.HTTPOk("OK") + # FIXME: if we have two players and game type is 'dm', + # change this into a 'duel' gametype. This should be + # removed when the stats actually send 'duel' instead of 'dm' + if len(players) == 2 and game_meta['G'] == 'dm': + game_meta['G'] = 'duel' + server = get_or_create_server(session=session, hashkey=idfp, name=game_meta['S'], revision=game_meta['R'], ip_addr=get_remote_addr(request)) -- 2.39.2