summaryrefslogtreecommitdiff
path: root/game
diff options
context:
space:
mode:
Diffstat (limited to 'game')
-rw-r--r--game/01_init.rpy1
-rw-r--r--game/03_init.rpy9
2 files changed, 8 insertions, 2 deletions
diff --git a/game/01_init.rpy b/game/01_init.rpy
index 9d45917..15e8b2a 100644
--- a/game/01_init.rpy
+++ b/game/01_init.rpy
@@ -54,7 +54,6 @@ init -3 python:
allfiles=[]
HOST=str(persistent.host)
PORT=str(persistent.port)
- UPDP=10302
FAILUREMSG="Request failed, Please try again"
OFFLINEMSG="401 Unauthorized"
OKMSG="200 OK"
diff --git a/game/03_init.rpy b/game/03_init.rpy
index f082530..90b4b3b 100644
--- a/game/03_init.rpy
+++ b/game/03_init.rpy
@@ -251,7 +251,14 @@ init python:
f=open(get_path(addr), "w")
stdout("Downloading additional file: %s" % img.replace(" ", "_"))
- x=requests.get("http://%s:%d/%s?token=%s" % (HOST, UPDP, img.replace(" ", "_"), get_token())) # , timeout=8.0 → Need to handle sudden death
+ try:
+ x=requests.get("https://%s/%s?token=%s" % (HOST, img.replace(" ", "_"), get_token())) # , timeout=8.0 → Need to handle sudden death
+ except:
+ # Oh noes - something went *terribly* wrong
+ traceback.print_exc()
+ x=requests.Response()
+ x.status_code=403
+
if x.status_code == 200:
f.write(x.content)
f.close()