mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-19 15:51:58 +00:00
Discord linking through EHR accounts, Privacy Policy Update
This commit is contained in:
1 parent
63062c1112
commit
9b82ebdcb9
5 files changed
+22
-9
No files matched your search
@@ -32,18 +32,19 @@ public static class LobbySharingAPI
|
||||
string serverName = Utils.GetRegionName();
|
||||
string hostName = Main.AllPlayerNames[PlayerControl.LocalPlayer.PlayerId].RemoveHtmlTags();
|
||||
string map = Options.RandomMapsMode.GetBool() ? "Random" : SubmergedCompatibility.Loaded && Main.NormalOptions.MapId == 6 ? "Submerged" : Main.CurrentMap.ToString();
|
||||
string gameMode = Options.EnableAutoGMRotation.GetBool() ? "Rotating" : Translator.GetString(Options.CurrentGameMode.ToString(), SupportedLangs.English).ToUpper();
|
||||
string gameMode = Options.EnableAutoGMRotation.GetBool() ? "Rotating" : Translator.GetString(Options.CurrentGameMode.ToString(), SupportedLangs.English).RemoveHtmlTags().ToUpper();
|
||||
string hostHashedPuid = Options.SendHashedPuidToUseLinkedAccount.GetBool() ? PlayerControl.LocalPlayer.GetClient().GetHashedPuid() : string.Empty;
|
||||
const string version = $"EHR v{Main.PluginDisplayVersion}";
|
||||
Main.Instance.StartCoroutine(SendLobbyCreatedRequest(roomCode, serverName, language, version, gameId, hostName, map, gameMode));
|
||||
Main.Instance.StartCoroutine(SendLobbyCreatedRequest(roomCode, serverName, language, version, gameId, hostName, map, gameMode, hostHashedPuid));
|
||||
}
|
||||
|
||||
private static IEnumerator SendLobbyCreatedRequest(string roomCode, string serverName, string language, string version, int gameId, string hostName, string map, string gameMode)
|
||||
private static IEnumerator SendLobbyCreatedRequest(string roomCode, string serverName, string language, string version, int gameId, string hostName, string map, string gameMode, string hostHashedPuid)
|
||||
{
|
||||
long timeSinceLastRequest = Utils.TimeStamp - LastRequestTimeStamp;
|
||||
if (timeSinceLastRequest < BufferTime) yield return new WaitForSeconds(BufferTime);
|
||||
LastRequestTimeStamp = Utils.TimeStamp;
|
||||
|
||||
var jsonData = $"{{\"roomCode\":\"{roomCode}\",\"serverName\":\"{serverName}\",\"language\":\"{language}\",\"version\":\"{version}\",\"gameId\":\"{gameId}\",\"hostName\":\"{hostName}\",\"map\":\"{map}\",\"gameMode\":\"{gameMode}\"}}";
|
||||
var jsonData = $"{{\"roomCode\":\"{roomCode}\",\"serverName\":\"{serverName}\",\"language\":\"{language}\",\"version\":\"{version}\",\"gameId\":\"{gameId}\",\"hostName\":\"{hostName}\",\"map\":\"{map}\",\"gameMode\":\"{gameMode}\",\"hostHashedPuid\":\"{hostHashedPuid}\"}}";
|
||||
byte[] jsonToSend = new UTF8Encoding().GetBytes(jsonData);
|
||||
|
||||
var request = new UnityWebRequest("https://gurge44.pythonanywhere.com/lobby_created", "POST")
|
||||
@@ -53,7 +54,7 @@ public static class LobbySharingAPI
|
||||
};
|
||||
|
||||
request.SetRequestHeader("Content-Type", "application/json");
|
||||
request.SetRequestHeader("User-Agent", $"{Main.ModName} v{Main.PluginVersion}");
|
||||
request.SetRequestHeader("User-Agent", $"{Main.ModName} v{Main.PluginVersion} - {hostName}");
|
||||
yield return request.SendWebRequest();
|
||||
|
||||
LastRequestTimeStamp = Utils.TimeStamp;
|
||||
@@ -83,11 +84,11 @@ public static class LobbySharingAPI
|
||||
{
|
||||
if (!Options.PostLobbyCodeToEHRWebsite.GetBool() || !AmongUsClient.Instance.AmHost) return;
|
||||
|
||||
if (GameCode.IntToGameName(AmongUsClient.Instance.GameId) != LastRoomCode)
|
||||
if (status != LobbyStatus.Closed && GameCode.IntToGameName(AmongUsClient.Instance.GameId) != LastRoomCode)
|
||||
{
|
||||
status = LobbyStatus.Closed;
|
||||
StartMessageEdit();
|
||||
LateTask.New(NotifyLobbyCreated, BufferTime);
|
||||
LateTask.New(NotifyLobbyCreated, BufferTime * 2);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -732,6 +732,8 @@ public static class Options
|
||||
public static OptionItem PhantomCanGuess;
|
||||
|
||||
public static OptionItem PostLobbyCodeToEHRWebsite;
|
||||
public static OptionItem SendHashedPuidToUseLinkedAccount;
|
||||
public static OptionItem LobbyUpdateInterval;
|
||||
public static OptionItem StoreCompletedAchievementsOnEHRDatabase;
|
||||
public static OptionItem AllCrewRolesHaveVanillaColor;
|
||||
public static OptionItem MessageRpcSizeLimit;
|
||||
@@ -1761,6 +1763,13 @@ public static class Options
|
||||
PostLobbyCodeToEHRWebsite = new BooleanOptionItem(19422, "PostLobbyCodeToEHRDiscordServer", true, TabGroup.SystemSettings)
|
||||
.SetHeader(true);
|
||||
|
||||
SendHashedPuidToUseLinkedAccount = new BooleanOptionItem(19501, "SendHashedPuidToUseLinkedAccount", true, TabGroup.SystemSettings)
|
||||
.SetParent(PostLobbyCodeToEHRWebsite);
|
||||
|
||||
LobbyUpdateInterval = new IntegerOptionItem(19502, "LobbyUpdateInterval", new(10, 600, 5), 30, TabGroup.SystemSettings)
|
||||
.SetParent(PostLobbyCodeToEHRWebsite)
|
||||
.SetValueFormat(OptionFormat.Seconds);
|
||||
|
||||
StoreCompletedAchievementsOnEHRDatabase = new BooleanOptionItem(19423, "StoreCompletedAchievementsOnEHRDatabase", true, TabGroup.SystemSettings);
|
||||
|
||||
AllCrewRolesHaveVanillaColor = new BooleanOptionItem(19424, "AllCrewRolesHaveVanillaColor", false, TabGroup.SystemSettings)
|
||||
|
||||
@@ -409,7 +409,7 @@ internal static class ModManagerLateUpdatePatch
|
||||
LateTask.Update(Time.deltaTime);
|
||||
ChatBubbleShower.Update();
|
||||
|
||||
if (LobbySharingAPI.LastRoomCode != string.Empty && Utils.TimeStamp - LobbySharingAPI.LastRequestTimeStamp > 60)
|
||||
if (LobbySharingAPI.LastRoomCode != string.Empty && Utils.TimeStamp - LobbySharingAPI.LastRequestTimeStamp > Options.LobbyUpdateInterval.GetInt())
|
||||
LobbySharingAPI.NotifyLobbyStatusChanged(PlayerControl.LocalPlayer == null ? LobbyStatus.Closed : GameStates.InGame ? LobbyStatus.In_Game : LobbyStatus.In_Lobby);
|
||||
|
||||
return false;
|
||||
|
||||
@@ -590,7 +590,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
### Privacy Policy for EHR Lobby Sharing
|
||||
|
||||
**Effective Date:** 2025-01-05
|
||||
**Effective Date:** 2025. 01. 05.
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -614,6 +614,7 @@ When using this integration, we collect the following non-personal information:
|
||||
- **Map Name:** The name of the map selected for the game (e.g., Skeld, Polus, Submerged).
|
||||
- **Game Mode:** The selected game mode (e.g., Standard, Room Rush, Free For All, Bed Wars).
|
||||
- **Lobby Status:** The current status of the lobby (e.g., In Lobby, In Game, Ended).
|
||||
- **Hashed PUID of the Host:** An encrypted version of the host's product user ID (see below), if `I have an EHR account linked to my discord account, send my hashed PUID to let discord users identify me` is enabled in System Settings, otherwise this field is left empty.
|
||||
|
||||
Furthermore, the following information is collected to enhance the user experience:
|
||||
|
||||
|
||||
@@ -3035,6 +3035,8 @@
|
||||
"AllCrewRolesHaveVanillaColor": "All <#8cffff>Crewmate</color> roles have <#8cffff>the vanilla Crewmate color</color> <#ffff00>(REQUIRES RESTART)</color>",
|
||||
"StoreCompletedAchievementsOnEHRDatabase": "Store completed achievements on the EHR database (to maintain progress in case of a reinstall or an update)",
|
||||
"PostLobbyCodeToEHRDiscordServer": "Post the lobby code to the EHR Website",
|
||||
"SendHashedPuidToUseLinkedAccount": "I have an EHR account linked to my discord account, send my hashed PUID to let discord users identify me",
|
||||
"LobbyUpdateInterval": "Always update the lobby info (player count, map, game mode, etc.) on the server at least every",
|
||||
"Message.LobbyCodeSent": "<size=90%><#00ffa5>✓</color> <#00a5ff>The lobby code has been sent to the EHR website. This will help others find EHR lobbies.</color></size>\\n<size=70%>You can disable this feature in the settings (System Settings tab).</size>",
|
||||
"Message.LobbyCodeSendError": "<size=90%><#ff0000>X</color> <#ff5555>Failed to send the lobby code to the EHR website.</color></size>\\n<size=70%>{0}</size>",
|
||||
"ActiveRolesList": "Active Roles List",
|
||||
|
||||
Reference in new issue
Block a user