summaryrefslogtreecommitdiff
path: root/game/script.rpy
diff options
context:
space:
mode:
Diffstat (limited to 'game/script.rpy')
-rw-r--r--game/script.rpy13
1 files changed, 9 insertions, 4 deletions
diff --git a/game/script.rpy b/game/script.rpy
index e33e082..80d369a 100644
--- a/game/script.rpy
+++ b/game/script.rpy
@@ -99,12 +99,17 @@ label start:
# on_open=None, on_message=None, on_error=None,
# on_close=None, on_ping=None, on_pong=None,
# on_data=None):
- ws = wsock.WebSocketApp("wss://"+HOST+":61000",
- on_data=ondata, on_error=onerror, on_open=onopen,
- on_message=onmsg)
+ if (persistent.ssl_enabled):
+ ws = wsock.WebSocketApp("wss://"+HOST+":61000",
+ on_data=ondata, on_error=onerror, on_open=onopen,
+ on_message=onmsg)
+ else:
+ ws = wsock.WebSocketApp("ws://"+HOST+":61000",
+ on_data=ondata, on_error=onerror, on_open=onopen,
+ on_message=onmsg)
print repr(ws)
ws.on_open = onopen
- renpy.invoke_in_thread(ws.run_forever, sslopt={"cert_reqs": ssl.CERT_NONE})
+ renpy.invoke_in_thread(ws.run_forever, sslopt={"cert_reqs": CERT_NONE})
#ws.connect("wss://localhost:61000")
while not tr_load: