mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2025-01-09 17:53:50 +00:00
29 lines
758 B
Python
29 lines
758 B
Python
|
#!/usr/bin/env python2
|
||
|
import json
|
||
|
import os
|
||
|
import requests
|
||
|
from pandac.PandaModules import *
|
||
|
|
||
|
|
||
|
username = os.environ['ttsUsername']
|
||
|
password = os.environ['ttsPassword']
|
||
|
|
||
|
accountServerEndpoint = ConfigVariableString(
|
||
|
'account-server-endpoint',
|
||
|
'http://tigercat1.me/tmpremote/api2/').getValue()
|
||
|
request = requests.post(
|
||
|
accountServerEndpoint + 'login/',
|
||
|
data={'n': username, 'p': password})
|
||
|
|
||
|
try:
|
||
|
response = json.loads(request.text)
|
||
|
except ValueError:
|
||
|
print "Couldn't verify account credentials."
|
||
|
else:
|
||
|
if not response['success']:
|
||
|
print response['reason']
|
||
|
else:
|
||
|
os.environ['TTS_PLAYCOOKIE'] = response['token']
|
||
|
|
||
|
# Start the game:
|
||
|
import toontown.toonbase.ClientStart
|