aboutsummaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-04-17 06:10:30 +0200
committerest31 <MTest31@outlook.com>2015-04-17 06:10:30 +0200
commitf0a1379e5a9ebc954e95d07c1ad5d71587adc6bc (patch)
tree38114d9be2e6bf1a0740035c41d5925c23f5036f /src/network
parent821d0025da3d7dec662e75c6ce2ea32e86aec508 (diff)
downloadminetest-f0a1379e5a9ebc954e95d07c1ad5d71587adc6bc.tar.gz
minetest-f0a1379e5a9ebc954e95d07c1ad5d71587adc6bc.tar.bz2
minetest-f0a1379e5a9ebc954e95d07c1ad5d71587adc6bc.zip
Refactor around translatePassword
Change types for passed password from wstring to string, which removes converting back and forth in most cases. Move the narrow_to_wide conversion, where its neccessary, closer to irrlicht. Remove trailing spaces in guiPasswordChange.cpp. Make parameters for translatePassword passed as const reference.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/serverpackethandler.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp
index 2f0e0b30c..955b1a7dc 100644
--- a/src/network/serverpackethandler.cpp
+++ b/src/network/serverpackethandler.cpp
@@ -267,8 +267,8 @@ void Server::handleCommand_Auth(NetworkPacket* pkt)
DenyAccess(pkt->getPeerId(), SERVER_ACCESSDENIED_EMPTY_PASSWORD);
return;
}
- std::wstring raw_default_password =
- narrow_to_wide(g_settings->get("default_password"));
+ std::string raw_default_password =
+ g_settings->get("default_password");
std::string initial_password =
translatePassword(playername, raw_default_password);
@@ -571,8 +571,8 @@ void Server::handleCommand_Init_Legacy(NetworkPacket* pkt)
L"disallowed. Set a password and try again.");
return;
}
- std::wstring raw_default_password =
- narrow_to_wide(g_settings->get("default_password"));
+ std::string raw_default_password =
+ g_settings->get("default_password");
std::string initial_password =
translatePassword(playername, raw_default_password);