import datetime\r
import logging\r
+import os\r
import pyramid.httpexceptions\r
import re\r
import time\r
if 'X-Server-IP' in request.headers:\r
return request.headers['X-Server-IP']\r
else:\r
- return request.remote_addr\r
+ return os.environ.get('HTTP_X_FORWARDED_FOR', request.remote_addr)\r
\r
\r
def is_supported_gametype(gametype):\r
\r
gmap = get_or_create_map(session=session, name=game_meta['M'])\r
\r
+ # FIXME: use the gmtime instead of utcnow() when the timezone bug is\r
+ # fixed\r
game = create_game(session=session, \r
- start_dt=datetime.datetime(\r
- *time.gmtime(float(game_meta['T']))[:6]), \r
+ start_dt=datetime.datetime.utcnow(),\r
+ #start_dt=datetime.datetime(\r
+ #*time.gmtime(float(game_meta['T']))[:6]), \r
server_id=server.server_id, game_type_cd=game_meta['G'], \r
map_id=gmap.map_id, match_id=game_meta['I'])\r
\r