mirror of
https://github.com/SoDOff-Project/sodoff.git
synced 2025-10-12 00:38:48 -07:00
make anything older then sod show an error when account is banned and ignore sod config file
This commit is contained in:
parent
1146d35334
commit
7376ab4e36
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,3 +11,4 @@ src/mods/
|
|||||||
src/assets-cache/
|
src/assets-cache/
|
||||||
src/Properties
|
src/Properties
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
src/assets/conf/WIN/3.31.0/DWADragonsMain.xml
|
||||||
|
@ -62,7 +62,7 @@ public class AuthenticationController : Controller {
|
|||||||
if(userBan is not null) {
|
if(userBan is not null) {
|
||||||
if (userBan.BanType != UserBanType.IndefiniteSuspension && DateTime.Compare(DateTime.UtcNow, userBan.EndsAt!.Value) >= 0) { moderationService.RemoveBanFromUser(user, userBan); userBan.EndsAt = DateTime.UtcNow; } // remove ban if its up and set retreived userban to have an end date of now
|
if (userBan.BanType != UserBanType.IndefiniteSuspension && DateTime.Compare(DateTime.UtcNow, userBan.EndsAt!.Value) >= 0) { moderationService.RemoveBanFromUser(user, userBan); userBan.EndsAt = DateTime.UtcNow; } // remove ban if its up and set retreived userban to have an end date of now
|
||||||
if (userBan.BanType == UserBanType.IndefiniteSuspension || (userBan.BanType == UserBanType.TemporarySuspension && DateTime.Compare(DateTime.UtcNow, userBan.EndsAt!.Value) < 0)) {
|
if (userBan.BanType == UserBanType.IndefiniteSuspension || (userBan.BanType == UserBanType.TemporarySuspension && DateTime.Compare(DateTime.UtcNow, userBan.EndsAt!.Value) < 0)) {
|
||||||
if (gameVersion <= ClientVersion.Max_OldJS) return Ok(new ParentLoginInfo{ Status = MembershipUserStatus.ProviderError });
|
if (gameVersion <= ClientVersion.Max_OldJS) return Ok(new ParentLoginInfo{ Status = MembershipUserStatus.ProviderError }); // everything 'OldJS' doesn't have 'UserIsBanned', so we use 'ProviderError' i
|
||||||
else return Ok(new ParentLoginInfo{ Status = MembershipUserStatus.UserIsBanned });
|
else return Ok(new ParentLoginInfo{ Status = MembershipUserStatus.UserIsBanned });
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -162,6 +162,7 @@ public class AuthenticationController : Controller {
|
|||||||
Viking? viking = ctx.Sessions.FirstOrDefault(e => e.ApiToken == apiToken)?.Viking;
|
Viking? viking = ctx.Sessions.FirstOrDefault(e => e.ApiToken == apiToken)?.Viking;
|
||||||
if (user is null && viking is null)
|
if (user is null && viking is null)
|
||||||
return Ok(false);
|
return Ok(false);
|
||||||
|
|
||||||
return Ok(true);
|
return Ok(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,6 +176,7 @@ public class AuthenticationController : Controller {
|
|||||||
Viking? viking = ctx.Sessions.FirstOrDefault(e => e.ApiToken == apiToken)?.Viking;
|
Viking? viking = ctx.Sessions.FirstOrDefault(e => e.ApiToken == apiToken)?.Viking;
|
||||||
if (user is null && viking is null)
|
if (user is null && viking is null)
|
||||||
return Ok(ApiTokenStatus.TokenNotFound);
|
return Ok(ApiTokenStatus.TokenNotFound);
|
||||||
|
|
||||||
return Ok(ApiTokenStatus.TokenValid);
|
return Ok(ApiTokenStatus.TokenValid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,13 +67,13 @@
|
|||||||
|
|
||||||
<!-- ASSET SERVER CONFIGURATION -->
|
<!-- ASSET SERVER CONFIGURATION -->
|
||||||
|
|
||||||
<RootURL>http://localhost:5001/.com/DWADragonsUnity/WIN/{Version}/Mid/</RootURL>
|
<RootURL>https://sodoff.com/DWADragonsUnity/WIN/{Version}/Mid/</RootURL>
|
||||||
<ContentDataURL>http://localhost:5001/.com/DWADragonsUnity/WIN/{Version}/Mid/contentdata</ContentDataURL>
|
<ContentDataURL>https://sodoff.com/DWADragonsUnity/WIN/{Version}/Mid/contentdata</ContentDataURL>
|
||||||
<DataURL>http://localhost:5001/.com/DWADragonsUnity/WIN/{Version}/Mid/data</DataURL>
|
<DataURL>https://sodoff.com/DWADragonsUnity/WIN/{Version}/Mid/data</DataURL>
|
||||||
<SceneURL>http://localhost:5001/.com/DWADragonsUnity/WIN/{Version}/Mid/scene</SceneURL>
|
<SceneURL>https://sodoff.com/DWADragonsUnity/WIN/{Version}/Mid/scene</SceneURL>
|
||||||
<SharedDataURL>http://localhost:5001/.com/DWADragonsUnity/WIN/{Version}/Mid/shareddata</SharedDataURL>
|
<SharedDataURL>https://sodoff.com/DWADragonsUnity/WIN/{Version}/Mid/shareddata</SharedDataURL>
|
||||||
<SoundURL>http://localhost:5001/.com/DWADragonsUnity/WIN/{Version}/Mid/sound</SoundURL>
|
<SoundURL>https://sodoff.com/DWADragonsUnity/WIN/{Version}/Mid/sound</SoundURL>
|
||||||
<MoviesURL>http://localhost:5001/.com/DWADragonsUnity/WIN/{Version}/Mid/movies</MoviesURL>
|
<MoviesURL>https://sodoff.com/DWADragonsUnity/WIN/{Version}/Mid/movies</MoviesURL>
|
||||||
|
|
||||||
<LocalRootURL>.</LocalRootURL>
|
<LocalRootURL>.</LocalRootURL>
|
||||||
<LocalContentDataURL>./contentdata</LocalContentDataURL>
|
<LocalContentDataURL>./contentdata</LocalContentDataURL>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user