diff --git a/MareSynchronos/MareSynchronos.csproj b/MareSynchronos/MareSynchronos.csproj index c09e4bf..4efed78 100644 --- a/MareSynchronos/MareSynchronos.csproj +++ b/MareSynchronos/MareSynchronos.csproj @@ -3,7 +3,7 @@ - 0.5.1 + 0.5.3 https://github.com/Penumbra-Sync/client diff --git a/MareSynchronos/UI/CompactUI.cs b/MareSynchronos/UI/CompactUI.cs index 2a460e2..6169094 100644 --- a/MareSynchronos/UI/CompactUI.cs +++ b/MareSynchronos/UI/CompactUI.cs @@ -631,11 +631,11 @@ public class CompactUi : Window, IDisposable return _apiController.ServerState switch { ServerState.Disconnected => "You are currently disconnected from the Mare Synchronos server.", - ServerState.Unauthorized => "Your account is not present on the server anymore or you are banned.", + ServerState.Unauthorized => "The account associated with your used secret key is not present on the server anymore or you are tempbanned. To check the latter disconnect and reconnect in 15 minutes.", ServerState.Offline => "Your selected Mare Synchronos server is currently offline.", ServerState.VersionMisMatch => "Your plugin or the server you are connecting to is out of date. Please update your plugin now. If you already did so, contact the server provider to update their server to the latest version.", - ServerState.RateLimited => "You are rate limited for (re)connecting too often. Wait and try again later.", + ServerState.RateLimited => "You are rate limited for (re)connecting too often. Disconnect, wait 10 minutes and try again.", ServerState.Connected => string.Empty, _ => string.Empty }; diff --git a/MareSynchronos/WebAPI/ApiController.cs b/MareSynchronos/WebAPI/ApiController.cs index d411be6..06a7a0e 100644 --- a/MareSynchronos/WebAPI/ApiController.cs +++ b/MareSynchronos/WebAPI/ApiController.cs @@ -205,6 +205,14 @@ public partial class ApiController : IDisposable, IMareHubClient } catch (HubException ex) { + if (ex.Message.Contains("unauthorized", StringComparison.OrdinalIgnoreCase)) + { + Logger.Warn(ex.Message); + ServerState = ServerState.Unauthorized; + await StopConnection(token).ConfigureAwait(false); + return; + } + Logger.Warn(ex.GetType().ToString()); Logger.Warn(ex.Message); Logger.Warn(ex.StackTrace ?? string.Empty);