fixup allnet response for res class 2

This commit is contained in:
Hay1tsme 2023-05-09 03:53:31 -04:00
parent 9766e3ab78
commit d172e5582b
2 changed files with 10 additions and 9 deletions

View File

@ -194,7 +194,7 @@ class AllnetServlet:
self.logger.info( self.logger.info(
f"DownloadOrder from {request_ip} -> {req.game_id} v{req.ver} serial {req.serial}" f"DownloadOrder from {request_ip} -> {req.game_id} v{req.ver} serial {req.serial}"
) )
resp = AllnetDownloadOrderResponse() resp = AllnetDownloadOrderResponse(serial=req.serial)
if ( if (
not self.config.allnet.allow_online_updates not self.config.allnet.allow_online_updates
@ -430,6 +430,7 @@ class AllnetPowerOnResponse3:
class AllnetPowerOnResponse2: class AllnetPowerOnResponse2:
def __init__(self) -> None: def __init__(self) -> None:
time = datetime.now(tz=pytz.timezone("Asia/Tokyo"))
self.stat = 1 self.stat = 1
self.uri = "" self.uri = ""
self.host = "" self.host = ""
@ -442,14 +443,14 @@ class AllnetPowerOnResponse2:
self.region_name2 = "Y" self.region_name2 = "Y"
self.region_name3 = "Z" self.region_name3 = "Z"
self.country = "JPN" self.country = "JPN"
self.year = datetime.now().year self.year = time.year
self.month = datetime.now().month self.month = time.month
self.day = datetime.now().day self.day = time.day
self.hour = datetime.now().hour self.hour = time.hour
self.minute = datetime.now().minute self.minute = time.minute
self.second = datetime.now().second self.second = time.second
self.setting = "1" self.setting = "1"
self.timezone = "+0900" self.timezone = "+09:00"
self.res_class = "PowerOnResponseV2" self.res_class = "PowerOnResponseV2"

View File

@ -99,7 +99,7 @@ class Mai2Servlet:
return ( return (
True, True,
f"http://{core_cfg.title.hostname}:{core_cfg.title.port}/{game_code}/$v/", f"http://{core_cfg.title.hostname}:{core_cfg.title.port}/{game_code}/$v/",
f"{core_cfg.title.hostname}:{core_cfg.title.port}", f"{core_cfg.title.hostname}",
) )
return ( return (