diff options
author | sfan5 <sfan5@live.de> | 2021-01-29 14:03:27 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2021-02-02 20:46:08 +0100 |
commit | c834d2ab25694ef2d67dc24f85f304269d202c8e (patch) | |
tree | c62a57d0cdbca950b9c7cb1a58666b6b77760bc2 /src/network | |
parent | 5e392cf34f8e062dd0533619921223656e32598a (diff) | |
download | minetest-c834d2ab25694ef2d67dc24f85f304269d202c8e.tar.gz minetest-c834d2ab25694ef2d67dc24f85f304269d202c8e.tar.bz2 minetest-c834d2ab25694ef2d67dc24f85f304269d202c8e.zip |
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.
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/serverpackethandler.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp index 4d79f375c..02af06abc 100644 --- a/src/network/serverpackethandler.cpp +++ b/src/network/serverpackethandler.cpp @@ -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)); } } |