mirror of
https://github.com/barronwaffles/dwc_network_server_emulator.git
synced 2026-08-20 17:45:23 -05:00
Added svcloc to NAS
This commit is contained in:
committed by
Admiral H. Curtiss
parent
359f4eb3e8
commit
ed38b0c823
@@ -80,6 +80,21 @@ class NintendoNasHTTPServerHandler(BaseHTTPServer.BaseHTTPRequestHandler):
|
||||
logger.log(logging.DEBUG, ret)
|
||||
self.wfile.write(self.dict_to_str(ret))
|
||||
|
||||
elif action == "SVCLOC" or action == "svcloc": # Get service based on service id number
|
||||
if post["svc"] == "9000": # DLC host = 9000
|
||||
ret["returncd"] = "007"
|
||||
ret["statusdata"] = "Y"
|
||||
ret["svchost"] = "dls1.nintendowifi.net"
|
||||
authtoken = self.server.db.generate_authtoken(post["userid"], post)
|
||||
ret["token"] = authtoken
|
||||
|
||||
logger.log(logging.DEBUG, "svcloc response to %s", self.client_address)
|
||||
logger.log(logging.DEBUG, ret)
|
||||
|
||||
self.wfile.write(self.dict_to_str(ret))
|
||||
|
||||
|
||||
|
||||
elif self.path == "/pr":
|
||||
length = int(self.headers['content-length'])
|
||||
post = self.str_to_dict(self.rfile.read(length))
|
||||
@@ -100,7 +115,6 @@ class NintendoNasHTTPServerHandler(BaseHTTPServer.BaseHTTPRequestHandler):
|
||||
|
||||
action = post["action"]
|
||||
|
||||
# TODO: Cache all DLC information in a database instead of querying the folder.
|
||||
ret = ""
|
||||
dlcpath = "dlc/" + post["gamecd"]
|
||||
dlc_contenttype = False
|
||||
|
||||
Reference in New Issue
Block a user