丨 & Plugin Update

This commit is contained in:
linmeideli committed 2026-07-04 14:18:51 +08:00
1 parent 0e70cafd23
commit 354bc1757d
10 files changed
+40 -20

No files matched your search

Binary file not shown.
Binary file not shown.
+5
View File
@@ -9,6 +9,11 @@
"version": "1.0.0",
"empostor_version": "2.0.0",
"download_url": "https://raw.githubusercontent.com/Empostor/Empostor/master/marketplace/Empostor.Plugin.Chat.dll"
},
{
"version": "1.1.0",
"empostor_version": "2.0.0",
"download_url": "https://raw.githubusercontent.com/Empostor/Empostor/master/marketplace/Empostor.Plugin.Chat1.1.0.dll"
}
]
},
@@ -150,6 +150,7 @@
"System.Runtime.CompilerServices.Unsafe": "4.5.3"
}
}
}
},
".NETStandard,Version=v2.0/win-x64": {}
}
}
+8 -1
View File
@@ -34,6 +34,12 @@
"Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0"
}
},
"Microsoft.NET.ILLink.Tasks": {
"type": "Direct",
"requested": "[8.0.28, )",
"resolved": "8.0.28",
"contentHash": "XMqgVjlLxLqWmEh3c49haXLQwsMNtvo6YscUaqfvEGfg1iA8hnYgkUVq3i9Zu9gKeNKMWiiZKVwZExc/qyEAsQ=="
},
"StyleCop.Analyzers": {
"type": "Direct",
"requested": "[1.2.0-beta.556, )",
@@ -139,6 +145,7 @@
"NextFast.Hazel.Abstractions": {
"type": "Project"
}
}
},
"net8.0/win-x64": {}
}
}
@@ -1008,7 +1008,7 @@ namespace Empostor.Server.Net.Inner.Objects
{
if (PlayerInfo.PlayerLevel != level)
{
_logger.LogInformation("★ {Name} ({Id}) | Level {Old} → {New}",
_logger.LogInformation("★ {Name} ({Id}) │ Level {Old} → {New}",
sender.Client.Name, sender.Client.Id, PlayerInfo.PlayerLevel, level);
}
@@ -109,7 +109,7 @@ namespace Empostor.Server.Net.Manager
if (versionCompare == ICompatibilityManager.VersionCompareResult.ServerTooOld
&& _compatibilityConfig.AllowFutureGameVersions && platformSpecificData != null)
{
_logger.LogWarning("#{Id} {Name} | using future version {Version}", id, name, clientVersion);
_logger.LogWarning("#{Id} {Name} │ using future version {Version}", id, name, clientVersion);
}
else if (versionCompare != ICompatibilityManager.VersionCompareResult.Compatible
|| platformSpecificData == null)
@@ -134,7 +134,7 @@ namespace Empostor.Server.Net.Manager
return;
}
_logger.LogInformation("#{Id} {Name} | host authority enabled", id, name);
_logger.LogInformation("#{Id} {Name} │ host authority enabled", id, name);
}
if (name.Length > 10) { await connection.CustomDisconnectAsync(DisconnectReason.Custom, DisconnectMessages.UsernameLength); return; }
@@ -144,11 +144,12 @@ namespace Empostor.Server.Net.Manager
UserAuthInfo? authInfo = null;
var clientIp = connection.EndPoint?.Address;
var location = await _ipGeo.GetLocationAsync(clientIp);
var locationStr = string.IsNullOrEmpty(location) ? "—" : location;
var lang = LanguageHelper.GetDisplayName(language);
var platformStr = platformSpecificData?.Platform.ToString() ?? "Unknown";
var reactorMods = connection.GetReactorMods();
var reactorStr = reactorMods?.Mods is { Count: > 0 } mods
? $" | Reactor: {string.Join(", ", System.Linq.Enumerable.Select(mods, m => $"{m.Id} {m.Version}"))}"
? $" │ Reactor: {string.Join(", ", System.Linq.Enumerable.Select(mods, m => $"{m.Id} {m.Version}"))}"
: string.Empty;
// Primary: match by delta port (nonce)
@@ -184,13 +185,13 @@ namespace Empostor.Server.Net.Manager
}
_logger.LogInformation(
"#{Id} {Name} | port {Port} | {Location} | {Lang} | {Platform} | FC {FriendCode} | {HashPuid}{Reactor}",
id, name, deltaPort, location, lang, platformStr, friendCode ?? "unknown", HashPuid(authInfo.ProductUserId), reactorStr);
"#{Id} {Name} │ port {Port} │ {Location} │ {Lang} │ {Platform} │ FC {FriendCode} │ {HashPuid}{Reactor}",
id, name, deltaPort, locationStr, lang, platformStr, friendCode ?? "unknown", HashPuid(authInfo.ProductUserId), reactorStr);
}
else
{
_logger.LogWarning(
"#{Id} {Name} | port {Port} has no auth info, falling back to IP",
"#{Id} {Name} │ port {Port} has no auth info, falling back to IP",
id, name, deltaPort);
}
}
@@ -203,14 +204,14 @@ namespace Empostor.Server.Net.Manager
{
friendCode = authInfo.FriendCode;
_logger.LogInformation(
"#{Id} {Name} | {Ip} | {Location} | {Lang} | {Platform} | FC {FriendCode} | {HashPuid}{Reactor}",
id, name, NormalizeIp(clientIp), location, lang, platformStr, friendCode ?? "unknown", HashPuid(authInfo.ProductUserId), reactorStr);
"#{Id} {Name} │ {Ip} │ {Location} │ {Lang} │ {Platform} │ FC {FriendCode} │ {HashPuid}{Reactor}",
id, name, NormalizeIp(clientIp), locationStr, lang, platformStr, friendCode ?? "unknown", HashPuid(authInfo.ProductUserId), reactorStr);
}
else
{
_logger.LogWarning(
"#{Id} {Name} | no auth | port {Port} | {Ip} | {Location} | {Lang} | {Platform}{Reactor}",
id, name, deltaPort, NormalizeIp(clientIp), location, lang, platformStr, reactorStr);
"#{Id} {Name} │ no auth │ port {Port} │ {Ip} │ {Location} │ {Lang} │ {Platform}{Reactor}",
id, name, deltaPort, NormalizeIp(clientIp), locationStr, lang, platformStr, reactorStr);
}
}
@@ -220,7 +221,7 @@ namespace Empostor.Server.Net.Manager
client.DeltaPort = deltaPort;
client.Id = id;
_logger.LogDebug("#{Id} {Name} | connected | FC={FC} | port {DP}", id, name, client.FriendCode ?? "(none)", deltaPort);
_logger.LogDebug("#{Id} {Name} │ connected │ FC={FC} │ port {DP}", id, name, client.FriendCode ?? "(none)", deltaPort);
_clients.TryAdd(id, client);
await _eventManager.CallAsync(new ClientConnectedEvent(connection, client));
}
@@ -72,7 +72,7 @@ namespace Empostor.Server.Net.State
public async ValueTask HandleKickPlayer(int playerId, bool isBan)
{
_logger.LogInformation("✂ Player {PlayerId} | Ban={IsBan}", playerId, isBan);
_logger.LogInformation("✂ Player {PlayerId} │ Ban={IsBan}", playerId, isBan);
using (var kickMsg = MessageWriter.Get(MessageType.Reliable))
{
WriteKickPlayerMessage(kickMsg, false, playerId, isBan);
@@ -130,10 +130,10 @@ namespace Empostor.Server.Net.State
var platformStr = string.IsNullOrEmpty(platformName) ? platform : $"{platform}/{platformName}";
var reactorMods = client.GetReactorMods();
var reactorStr = reactorMods?.Mods is { Count: > 0 } mods
? $" | Reactor: {string.Join(", ", System.Linq.Enumerable.Select(mods, m => $"{m.Id} {m.Version}"))}"
? $" │ Reactor: {string.Join(", ", System.Linq.Enumerable.Select(mods, m => $"{m.Id} {m.Version}"))}"
: string.Empty;
_logger.LogInformation("▶ {Name} ({Id}) joined | {Lang} | {Platform} | v{Version} | Authority:{Authority} | port {DeltaPort}{Reactor}",
_logger.LogInformation("▶ {Name} ({Id}) joined │ {Lang} │ {Platform} │ v{Version} │ Authority:{Authority} │ port {DeltaPort}{Reactor}",
sender.Client.Name, sender.Client.Id, lang, platformStr, version, authority, deltaPort, reactorStr);
if (isNew)
@@ -224,7 +224,7 @@ namespace Empostor.Server.Net.State
private async ValueTask HandleJoinGameNext(ClientPlayer sender, bool isNew)
{
var authority = sender.Client.GameVersion.HasDisableServerAuthorityFlag ? "true" : "false";
_logger.LogInformation("↻ {Name} ({Id}) rejoined | Authority:{Authority} | port {DeltaPort}",
_logger.LogInformation("↻ {Name} ({Id}) rejoined │ Authority:{Authority} │ port {DeltaPort}",
sender.Client.Name, sender.Client.Id, authority, sender.Client.DeltaPort);
if (isNew)
+2 -2
View File
@@ -33,7 +33,7 @@ namespace Empostor.Server.Net.State
return false;
}
_logger.LogInformation("◀ {Name} ({Id}) left | {Reason} | {HashPuid}",
_logger.LogInformation("◀ {Name} ({Id}) left │ {Reason} │ {HashPuid}",
player.Client.Name, playerId, reason,
player.Client.ProductUserId?.Length >= 9 ? player.Client.ProductUserId[..9] : player.Client.ProductUserId ?? "0");
if (GameState == GameStates.Starting || GameState == GameStates.Started || GameState == GameStates.NotStarted)
@@ -71,7 +71,7 @@ namespace Empostor.Server.Net.State
await Task.Delay(_timeoutConfig.ConnectionTimeout);
if (player.Client.Connection.IsConnected && player.Client.Connection is HazelConnection hazel)
{
_logger.LogInformation("◀ {Name} ({Id}) left | kept connection, disposing", player.Client.Name, playerId);
_logger.LogInformation("◀ {Name} ({Id}) left │ kept connection, disposing", player.Client.Name, playerId);
await player.Client.DisconnectAsync(isBan ? DisconnectReason.Banned : DisconnectReason.Kicked);
}
});
+6
View File
@@ -58,6 +58,12 @@
"resolved": "8.0.1",
"contentHash": "X21b8D6z58EG34OMLH955750mFaEaGs5xLGe9Vyi3059Cgb3sk+p2k/JlQXaieEBRrk+SVlFzDei3Q6PdVzJOA=="
},
"Microsoft.NET.ILLink.Tasks": {
"type": "Direct",
"requested": "[8.0.28, )",
"resolved": "8.0.28",
"contentHash": "XMqgVjlLxLqWmEh3c49haXLQwsMNtvo6YscUaqfvEGfg1iA8hnYgkUVq3i9Zu9gKeNKMWiiZKVwZExc/qyEAsQ=="
},
"Serilog.Extensions.Hosting": {
"type": "Direct",
"requested": "[8.0.0, )",