summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorAndré Glüpker <git@wgmd.de>2018-03-23 22:27:20 +0100
committerAndré Glüpker <git@wgmd.de>2018-03-23 22:27:20 +0100
commit323bbe0161d14c206f27744f0ab46f03cc0e2db1 (patch)
treeee7552179e91f63e5e8c3fad2c509a6984a021e2 /main.py
parent0ea316c780569ac7740019fd9c908cf4bce2c49f (diff)
downloadsteam-323bbe0161d14c206f27744f0ab46f03cc0e2db1.tar.gz
steam-323bbe0161d14c206f27744f0ab46f03cc0e2db1.tar.bz2
steam-323bbe0161d14c206f27744f0ab46f03cc0e2db1.zip
Introduce new page with serverinfo
Diffstat (limited to 'main.py')
-rwxr-xr-xmain.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/main.py b/main.py
index 7577d2d..9ae9b54 100755
--- a/main.py
+++ b/main.py
@@ -168,6 +168,19 @@ def premades():
connections=connections
)
+@app.route("/server", methods=['GET'])
+def server():
+ with open(os.path.join(CONFIG, 'server.json'), 'rt') as config:
+ servers = json.load(config)
+ for name, server in servers.items():
+ server['data'] = QueryServer.QueryServer(server['ip'], server['port'], server['gameid'])
+ return render_template('server_html.jinja',
+ servers=servers
+ # profiles=premadedata,
+ # display_time=display_time,
+ # connections=connections
+ )
+
if __name__ == '__main__':
# print(steam.getFriends("76561197963063991"))
# print(steam.getFriends("76561197963882989"))