summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorAndré Glüpker <git@wgmd.de>2018-01-26 00:47:54 +0100
committerAndré Glüpker <git@wgmd.de>2018-01-26 00:47:54 +0100
commit98a97bc04365db9becb1038f88e10866a829b280 (patch)
tree9124502891e384f406393651c07be36c721d2c21 /main.py
parent81cfe943b265e8b9d41ad7d150cca92a537d7d2c (diff)
downloadsteam-98a97bc04365db9becb1038f88e10866a829b280.tar.gz
steam-98a97bc04365db9becb1038f88e10866a829b280.tar.bz2
steam-98a97bc04365db9becb1038f88e10866a829b280.zip
Ask SteamAPI for owned games and gamestats in CSGO.
This is used in Premade Finder to maybe identify Smurfs.
Diffstat (limited to 'main.py')
-rwxr-xr-xmain.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/main.py b/main.py
index ae6030b..7577d2d 100755
--- a/main.py
+++ b/main.py
@@ -135,7 +135,7 @@ def lobby():
@app.route("/premadefinder", methods=['GET', 'POST'])
def premades():
steamids = []
- profiles = dict()
+ premadedata = dict()
connections = set()
if request.method == 'POST':
@@ -150,12 +150,12 @@ def premades():
)
# Ask steam about profiles
- profiles = steam.getMultipleFriends(steamids)
+ premadedata = steam.getDataForPremadefinder(steamids)
# Add connection between friends.
# Friends are always bidirectional, so we use set and min/max to avoid duplicates
for steamid in steamids:
- for friend in profiles[steamid]['friends']:
+ for friend in premadedata[steamid]['_friends']:
if friend in steamids:
friend_a = min(steamid, friend)
friend_b = max(steamid, friend)
@@ -163,7 +163,8 @@ def premades():
return render_template('premades_html.jinja',
steamids=steamids,
- profiles=profiles,
+ profiles=premadedata,
+ display_time=display_time,
connections=connections
)