修复 ValidateClientParameters 可能未启用的 BUG

This commit is contained in:
milimoe 2025-11-26 00:45:05 +08:00
parent ffa839e9f1
commit 449cb1df9b
Signed by: milimoe
GPG Key ID: 9554D37E4B8991D0

View File

@ -154,11 +154,8 @@ namespace Milimoe.FunGame.Server.Controller
} }
} }
if (ValidateClientParameters is null) if (ValidateClientParameters != null)
{ {
return "";
}
foreach (Func<SocketObject, string> handler in ValidateClientParameters.GetInvocationList().Cast<Func<SocketObject, string>>()) foreach (Func<SocketObject, string> handler in ValidateClientParameters.GetInvocationList().Cast<Func<SocketObject, string>>())
{ {
string msg = handler(obj); string msg = handler(obj);
@ -168,6 +165,8 @@ namespace Milimoe.FunGame.Server.Controller
ServerHelper.WriteLine(msg, InvokeMessageType.Error); ServerHelper.WriteLine(msg, InvokeMessageType.Error);
} }
} }
}
return builder.ToString().Trim(); return builder.ToString().Trim();
} }
} }