mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 17:57:21 +01:00
remove notification spam, add more trace logging for secret key access
This commit is contained in:
parent
e1f480b44a
commit
0c47bf8ccd
2 changed files with 10 additions and 5 deletions
|
|
@ -43,9 +43,6 @@ public class PlayerDataFactory
|
||||||
{
|
{
|
||||||
if (!_ipcManager.Initialized)
|
if (!_ipcManager.Initialized)
|
||||||
{
|
{
|
||||||
_mareMediator.Publish(new NotificationMessage("Penumbra/Glamourer inactive",
|
|
||||||
"Mare attempted to process building your character data, but Penumbra or Glamourer are inactive. Enable and set up Penumbra and Glamourer for Mare to be able to function.",
|
|
||||||
NotificationType.Error));
|
|
||||||
throw new InvalidOperationException("Penumbra or Glamourer is not connected");
|
throw new InvalidOperationException("Penumbra or Glamourer is not connected");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -103,17 +103,25 @@ public class ServerConfigurationManager
|
||||||
var auth = currentServer.Authentications.FindAll(f => string.Equals(f.CharacterName, charaName, StringComparison.Ordinal) && f.WorldId == worldId);
|
var auth = currentServer.Authentications.FindAll(f => string.Equals(f.CharacterName, charaName, StringComparison.Ordinal) && f.WorldId == worldId);
|
||||||
if (auth.Count >= 2)
|
if (auth.Count >= 2)
|
||||||
{
|
{
|
||||||
_mareMediator.Publish(new NotificationMessage("Multiple Identical Characters detected", "Your Service configuration has multiple characters with the same name and world set up. Please delete the duplicates.",
|
_mareMediator.Publish(new NotificationMessage("Multiple Identical Characters detected", "Your Service configuration has multiple characters with the same name and world set up. Please delete the duplicates in the character configuration.",
|
||||||
NotificationType.Error));
|
NotificationType.Error));
|
||||||
|
_logger.LogTrace("GetSecretKey accessed, returning null because multiple ({count}) identical characters.", auth.Count);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (auth.Count == 0)
|
||||||
|
{
|
||||||
|
_logger.LogTrace("GetSecretKey accessed, returning null because no set up characters for {chara} on {world}", charaName, worldId);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (auth.Count == 0) return null;
|
|
||||||
|
|
||||||
if (currentServer.SecretKeys.TryGetValue(auth.Single().SecretKeyIdx, out var secretKey))
|
if (currentServer.SecretKeys.TryGetValue(auth.Single().SecretKeyIdx, out var secretKey))
|
||||||
{
|
{
|
||||||
|
_logger.LogTrace("GetSecretKey accessed, returning {key} ({keyValue}) for {chara} on {world}", secretKey.FriendlyName, string.Join("", secretKey.Key.Take(10)), charaName, worldId);
|
||||||
return secretKey.Key;
|
return secretKey.Key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_logger.LogTrace("GetSecretKey accessed, returning null because no fitting key found for {chara} on {world} for idx {idx}.", charaName, worldId, auth.Single().SecretKeyIdx);
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue