mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Protocol 25: wstring -> string for custom access denial reasons
Also fix std::logic_error when server::DenyAccess() is used with only two arguments.
This commit is contained in:
@@ -149,9 +149,7 @@ void Client::handleCommand_AccessDenied(NetworkPacket* pkt)
|
||||
u8 denyCode = SERVER_ACCESSDENIED_UNEXPECTED_DATA;
|
||||
*pkt >> denyCode;
|
||||
if (denyCode == SERVER_ACCESSDENIED_CUSTOM_STRING) {
|
||||
std::wstring wide_reason;
|
||||
*pkt >> wide_reason;
|
||||
m_access_denied_reason = wide_to_narrow(wide_reason);
|
||||
*pkt >> m_access_denied_reason;
|
||||
}
|
||||
else if (denyCode < SERVER_ACCESSDENIED_MAX) {
|
||||
m_access_denied_reason = accessDeniedStrings[denyCode];
|
||||
|
Reference in New Issue
Block a user