mirror of
https://github.com/project-redbud/FunGame-Server.git
synced 2025-12-05 00:06:03 +00:00
修复 ValidateClientParameters 可能未启用的 BUG
This commit is contained in:
parent
ffa839e9f1
commit
449cb1df9b
@ -154,20 +154,19 @@ 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>>())
|
||||
{
|
||||
string msg = handler(obj);
|
||||
if (msg != "")
|
||||
foreach (Func<SocketObject, string> handler in ValidateClientParameters.GetInvocationList().Cast<Func<SocketObject, string>>())
|
||||
{
|
||||
builder.AppendLine(msg);
|
||||
ServerHelper.WriteLine(msg, InvokeMessageType.Error);
|
||||
string msg = handler(obj);
|
||||
if (msg != "")
|
||||
{
|
||||
builder.AppendLine(msg);
|
||||
ServerHelper.WriteLine(msg, InvokeMessageType.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return builder.ToString().Trim();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user