add special-case ping handlers to mai2, ongeki and chuni
This commit is contained in:
parent
6dcd7b67ef
commit
c8d4bc6109
@ -21,9 +21,6 @@ class ChuniBase():
|
||||
self.game = ChuniConstants.GAME_CODE
|
||||
self.version = ChuniConstants.VER_CHUNITHM
|
||||
|
||||
def handle_ping_request(self, data: Dict) -> Dict:
|
||||
return {"returnCode": 1}
|
||||
|
||||
def handle_game_login_api_request(self, data: Dict) -> Dict:
|
||||
#self.data.base.log_event("chuni", "login", logging.INFO, {"version": self.version, "user": data["userId"]})
|
||||
return { "returnCode": 1 }
|
||||
|
@ -86,6 +86,9 @@ class ChuniServlet():
|
||||
return (True, f"http://{core_cfg.title.hostname}/{game_code}/$v/", "")
|
||||
|
||||
def render_POST(self, request: Request, version: int, url_path: str) -> bytes:
|
||||
if url_path == "/ping":
|
||||
return zlib.compress(json.dumps({'returnCode': 1}, ensure_ascii=False).encode("utf-8"))
|
||||
|
||||
req_raw = request.content.getvalue()
|
||||
url_split = url_path.split("/")
|
||||
encrtped = False
|
||||
|
@ -16,9 +16,6 @@ class Mai2Base():
|
||||
self.data = Mai2Data(cfg)
|
||||
self.logger = logging.getLogger("mai2")
|
||||
|
||||
def handle_ping_request(self, data: Dict) -> Dict:
|
||||
return {"returnCode": 1}
|
||||
|
||||
def handle_get_game_setting_api_request(self, data: Dict):
|
||||
reboot_start = date.strftime(datetime.now() + timedelta(hours=3), Mai2Constants.DATE_TIME_FORMAT)
|
||||
reboot_end = date.strftime(datetime.now() + timedelta(hours=4), Mai2Constants.DATE_TIME_FORMAT)
|
||||
|
@ -69,6 +69,9 @@ class Mai2Servlet():
|
||||
return (True, f"http://{core_cfg.title.hostname}/{game_code}/$v/", f"{core_cfg.title.hostname}/")
|
||||
|
||||
def render_POST(self, request: Request, version: int, url_path: str) -> bytes:
|
||||
if url_path == "/ping":
|
||||
return zlib.compress(json.dumps({'returnCode': 1}, ensure_ascii=False).encode("utf-8"))
|
||||
|
||||
req_raw = request.content.getvalue()
|
||||
url = request.uri.decode()
|
||||
url_split = url_path.split("/")
|
||||
|
@ -72,6 +72,9 @@ class OngekiServlet():
|
||||
return (True, f"http://{core_cfg.title.hostname}/{game_code}/$v/", f"{core_cfg.title.hostname}/")
|
||||
|
||||
def render_POST(self, request: Request, version: int, url_path: str) -> bytes:
|
||||
if url_path == "/ping":
|
||||
return zlib.compress(json.dumps({'returnCode': 1}, ensure_ascii=False).encode("utf-8"))
|
||||
|
||||
req_raw = request.content.getvalue()
|
||||
url_split = url_path.split("/")
|
||||
internal_ver = 0
|
||||
|
Loading…
Reference in New Issue
Block a user