add disable autologon on a per character basis
add automatic notes population on empty notes adjust mare command help text
This commit is contained in:
@@ -371,7 +371,19 @@ public sealed partial class ApiController : DisposableMediatorSubscriberBase, IM
|
||||
|
||||
private void DalamudUtilOnLogIn()
|
||||
{
|
||||
_ = Task.Run(() => CreateConnectionsAsync());
|
||||
var charaName = _dalamudUtil.GetPlayerNameAsync().GetAwaiter().GetResult();
|
||||
var worldId = _dalamudUtil.GetHomeWorldIdAsync().GetAwaiter().GetResult();
|
||||
var auth = _serverManager.CurrentServer.Authentications.Find(f => string.Equals(f.CharacterName, charaName, StringComparison.Ordinal) && f.WorldId == worldId);
|
||||
if (auth?.AutoLogin ?? false)
|
||||
{
|
||||
Logger.LogInformation("Logging into {chara}", charaName);
|
||||
_ = Task.Run(CreateConnectionsAsync);
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.LogInformation("Not logging into {chara}, auto login disabled", charaName);
|
||||
_ = Task.Run(async () => await StopConnectionAsync(ServerState.NoAutoLogon).ConfigureAwait(false));
|
||||
}
|
||||
}
|
||||
|
||||
private void DalamudUtilOnLogOut()
|
||||
|
||||
@@ -14,5 +14,6 @@ public enum ServerState
|
||||
NoSecretKey,
|
||||
MultiChara,
|
||||
OAuthMisconfigured,
|
||||
OAuthLoginTokenStale
|
||||
OAuthLoginTokenStale,
|
||||
NoAutoLogon
|
||||
}
|
||||
Reference in New Issue
Block a user