mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[Rules] Add rules for requiring custom files from client (#4561)
* rules for enabling requiring custom files * shorten default * variable name * check account status for enforcing client key * rule for custom files admin level --------- Co-authored-by: Paul Johnson <Paul@pjohnsomac-6366.digi.box>
This commit is contained in:
@@ -541,6 +541,17 @@ bool Client::HandleSendLoginInfoPacket(const EQApplicationPacket *app)
|
||||
skip_char_info = true;
|
||||
}
|
||||
}
|
||||
const auto& custom_files_key = RuleS(World, CustomFilesKey);
|
||||
if (!skip_char_info && !custom_files_key.empty() && cle->Admin() < RuleI(World, CustomFilesAdminLevel)) {
|
||||
// Modified clients can utilize this unused block in login_info to send custom payloads on login
|
||||
// which indicates they are using custom client files with the correct version, based on key payload.
|
||||
const auto client_key = std::string(reinterpret_cast<char*>(login_info->unknown064));
|
||||
if (custom_files_key != client_key) {
|
||||
std::string message = fmt::format("Missing Files [{}]", RuleS(World, CustomFilesUrl) );
|
||||
SendUnsupportedClientPacket(message);
|
||||
skip_char_info = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!skip_char_info) {
|
||||
SendExpansionInfo();
|
||||
|
||||
Reference in New Issue
Block a user