From: Ant Zucaro Date: Thu, 15 Dec 2011 03:05:50 +0000 (-0500) Subject: Add support for the not-yet-created "duel" gametype. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f5b086a5c35f73b3fb7b3cbdd49999cb6e2f1dae;p=xonotic%2Fxonstat.git Add support for the not-yet-created "duel" gametype. --- 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))