]> de.git.xonotic.org Git - xonotic/xonstat.git/commitdiff
Add support for the not-yet-created "duel" gametype.
authorAnt Zucaro <azucaro@gmail.com>
Thu, 15 Dec 2011 03:05:50 +0000 (22:05 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Thu, 15 Dec 2011 03:05:50 +0000 (22:05 -0500)
xonstat/views/submission.py

index 9d82aa163b19bb09be78f0034e68b38a489ef776..c0e5a5130032c5590f25323cbefddd1c9082380b 100755 (executable)
@@ -525,6 +525,12 @@ def stats_submit(request):
             log.debug("ERROR: Not enough real players")\r
             raise pyramid.httpexceptions.HTTPOk("OK")\r
 \r
+        # FIXME: if we have two players and game type is 'dm',\r
+        # change this into a 'duel' gametype. This should be\r
+        # removed when the stats actually send 'duel' instead of 'dm'\r
+        if len(players) == 2 and game_meta['G'] == 'dm':\r
+            game_meta['G'] = 'duel'\r
+\r
         server = get_or_create_server(session=session, hashkey=idfp, \r
                 name=game_meta['S'], revision=game_meta['R'],\r
                 ip_addr=get_remote_addr(request))\r