mirror of
https://github.com/minetest/minetest.git
synced 2025-07-01 15:40:23 +02:00
Drop wide/narrow conversion functions
The only valid usecase for these is interfacing with OS APIs that want a locale/OS-specific multibyte encoding. But they weren't used for that anywhere, instead UTF-8 is pretty much assumed when it comes to that. Since these are only a potential source of bugs and do not fulfil their purpose at all, drop them entirely.
This commit is contained in:
@ -778,15 +778,13 @@ void Server::handleCommand_ChatMessage(NetworkPacket* pkt)
|
||||
return;
|
||||
}
|
||||
|
||||
// Get player name of this client
|
||||
std::string name = player->getName();
|
||||
std::wstring wname = narrow_to_wide(name);
|
||||
|
||||
std::wstring answer_to_sender = handleChat(name, wname, message, true, player);
|
||||
std::wstring answer_to_sender = handleChat(name, message, true, player);
|
||||
if (!answer_to_sender.empty()) {
|
||||
// Send the answer to sender
|
||||
SendChatMessage(peer_id, ChatMessage(CHATMESSAGE_TYPE_NORMAL,
|
||||
answer_to_sender, wname));
|
||||
SendChatMessage(peer_id, ChatMessage(CHATMESSAGE_TYPE_SYSTEM,
|
||||
answer_to_sender));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user