Browse Source

update hook test2

Lurkars 6 years ago
parent
commit
0c3d9ab9a5
  1. 1
      ext/server.py

1
ext/server.py

@ -80,6 +80,7 @@ def create_game():
if 'X-Forwarded-For' in request.headers: if 'X-Forwarded-For' in request.headers:
remote_addr = request.headers.getlist( remote_addr = request.headers.getlist(
"X-Forwarded-For")[0].rpartition(' ')[-1] "X-Forwarded-For")[0].rpartition(' ')[-1]
cur.execute("INSERT INTO games (name,secret,ip,port,bots,player_count,running) VALUES (?,?,?,?,?,0,0)", cur.execute("INSERT INTO games (name,secret,ip,port,bots,player_count,running) VALUES (?,?,?,?,?,0,0)",
(name, secret, remote_addr, port, bots)) (name, secret, remote_addr, port, bots))
con.commit() con.commit()

Loading…
Cancel
Save