]> git.lizzy.rs Git - minetest.git/commitdiff
Change error_message from wstring to string
authorShadowNinja <shadowninja@minetest.net>
Sat, 28 Mar 2015 00:24:04 +0000 (20:24 -0400)
committerShadowNinja <shadowninja@minetest.net>
Sat, 28 Mar 2015 00:24:04 +0000 (20:24 -0400)
This removes a lot of narrow/wide conversions where a wide string was never used.

src/camera.cpp
src/camera.h
src/client.h
src/client/clientlauncher.cpp
src/client/clientlauncher.h
src/game.cpp
src/game.h
src/network/clientpackethandler.cpp
src/network/networkprotocol.h

index 5200f71ba70c7bf682388ed1fd0c5a43743e3cfd..111a4b241dfb275484a4c90e0b945ffb2d97066c 100644 (file)
@@ -119,34 +119,20 @@ Camera::~Camera()
        m_wieldmgr->drop();
 }
 
-bool Camera::successfullyCreated(std::wstring& error_message)
+bool Camera::successfullyCreated(std::string &error_message)
 {
-       if (m_playernode == NULL)
-       {
-               error_message = L"Failed to create the player scene node";
-               return false;
-       }
-       if (m_headnode == NULL)
-       {
-               error_message = L"Failed to create the head scene node";
-               return false;
-       }
-       if (m_cameranode == NULL)
-       {
-               error_message = L"Failed to create the camera scene node";
-               return false;
-       }
-       if (m_wieldmgr == NULL)
-       {
-               error_message = L"Failed to create the wielded item scene manager";
-               return false;
-       }
-       if (m_wieldnode == NULL)
-       {
-               error_message = L"Failed to create the wielded item scene node";
-               return false;
+       if (!m_playernode) {
+               error_message = "Failed to create the player scene node";
+       } else if (!m_headnode) {
+               error_message = "Failed to create the head scene node";
+       } else if (!m_cameranode) {
+               error_message = "Failed to create the camera scene node";
+       } else if (!m_wieldmgr) {
+               error_message = "Failed to create the wielded item scene manager";
+       } else if (!m_wieldnode) {
+               error_message = "Failed to create the wielded item scene node";
        }
-       return true;
+       return error_message.empty();
 }
 
 // Returns the fractional part of x
index b5373886087b6e5d6ea2e99a661f4cd9beeae920..b0d190a3afc5710013f45b09d9b185c3932f50c3 100644 (file)
@@ -110,7 +110,7 @@ class Camera
        }
 
        // Checks if the constructor was able to create the scene nodes
-       bool successfullyCreated(std::wstring& error_message);
+       bool successfullyCreated(std::string &error_message);
 
        // Step the camera: updates the viewing range and view bobbing.
        void step(f32 dtime);
index ab584267822531038851c81d310af15de64306f3..9db9764ddd3485a2ce7a725cdf085b18702ab88d 100644 (file)
@@ -480,7 +480,7 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
        bool accessDenied()
        { return m_access_denied; }
 
-       std::wstring accessDeniedReason()
+       std::string accessDeniedReason()
        { return m_access_denied_reason; }
 
        bool itemdefReceived()
@@ -589,7 +589,7 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
        u64 m_map_seed;
        std::string m_password;
        bool m_access_denied;
-       std::wstring m_access_denied_reason;
+       std::string m_access_denied_reason;
        std::queue<ClientEvent> m_client_event_queue;
        bool m_itemdef_received;
        bool m_nodedef_received;
index ca5e124825fbb189fe656ed15447f8720a29e148..7b2aaa74f1e7879f837a75a65e1c673d2252f4a2 100644 (file)
@@ -156,7 +156,7 @@ bool ClientLauncher::run(GameParams &game_params, const Settings &cmd_args)
 
        // If an error occurs, this is set to something by menu().
        // It is then displayed before  the menu shows on the next call to menu()
-       std::wstring error_message = L"";
+       std::string error_message;
 
        bool first_loop = true;
 
@@ -184,7 +184,7 @@ bool ClientLauncher::run(GameParams &game_params, const Settings &cmd_args)
                        */
                        guiroot = guienv->addStaticText(L"", core::rect<s32>(0, 0, 10000, 10000));
 
-                       bool game_has_run = launch_game(&error_message, game_params, cmd_args);
+                       bool game_has_run = launch_game(error_message, game_params, cmd_args);
 
                        // If skip_main_menu, we only want to startup once
                        if (skip_main_menu && !first_loop)
@@ -207,7 +207,7 @@ bool ClientLauncher::run(GameParams &game_params, const Settings &cmd_args)
                        }
 
                        if (current_playername.length() > PLAYERNAME_SIZE-1) {
-                               error_message = wgettext("Player name too long.");
+                               error_message = gettext("Player name too long.");
                                playername = current_playername.substr(0, PLAYERNAME_SIZE-1);
                                g_settings->set("name", playername);
                                continue;
@@ -245,25 +245,24 @@ bool ClientLauncher::run(GameParams &game_params, const Settings &cmd_args)
 
                } //try
                catch (con::PeerNotFoundException &e) {
-                       error_message = wgettext("Connection error (timed out?)");
-                       errorstream << wide_to_narrow(error_message) << std::endl;
+                       error_message = gettext("Connection error (timed out?)");
+                       errorstream << error_message << std::endl;
                }
 
 #ifdef NDEBUG
                catch (std::exception &e) {
-                       std::string narrow_message = "Some exception: \"";
-                       narrow_message += e.what();
-                       narrow_message += "\"";
-                       errorstream << narrow_message << std::endl;
-                       error_message = narrow_to_wide(narrow_message);
+                       std::string error_message = "Some exception: \"";
+                       error_message += e.what();
+                       error_message += "\"";
+                       errorstream << error_message << std::endl;
                }
 #endif
 
                // If no main menu, show error and exit
                if (skip_main_menu) {
-                       if (error_message != L"") {
+                       if (!error_message.empty()) {
                                verbosestream << "error_message = "
-                                             << wide_to_narrow(error_message) << std::endl;
+                                             << error_message << std::endl;
                                retval = false;
                        }
                        break;
@@ -312,7 +311,7 @@ bool ClientLauncher::init_engine(int log_level)
        return device != NULL;
 }
 
-bool ClientLauncher::launch_game(std::wstring *error_message,
+bool ClientLauncher::launch_game(std::string &error_message,
                GameParams &game_params, const Settings &cmd_args)
 {
        // Initialize menu data
@@ -320,9 +319,9 @@ bool ClientLauncher::launch_game(std::wstring *error_message,
        menudata.address      = address;
        menudata.name         = playername;
        menudata.port         = itos(game_params.socket_port);
-       menudata.errormessage = wide_to_narrow(*error_message);
+       menudata.errormessage = error_message;
 
-       *error_message = L"";
+       error_message.clear();
 
        if (cmd_args.exists("password"))
                menudata.password = cmd_args.get("password");
@@ -367,11 +366,11 @@ bool ClientLauncher::launch_game(std::wstring *error_message,
                }
        }
 
-       if (menudata.errormessage != "") {
+       if (!menudata.errormessage.empty()) {
                /* The calling function will pass this back into this function upon the
                 * next iteration (if any) causing it to be displayed by the GUI
                 */
-               *error_message = narrow_to_wide(menudata.errormessage);
+               error_message = menudata.errormessage;
                return false;
        }
 
@@ -410,25 +409,25 @@ bool ClientLauncher::launch_game(std::wstring *error_message,
 
        if (current_address == "") { // If local game
                if (worldspec.path == "") {
-                       *error_message = wgettext("No world selected and no address "
+                       error_message = gettext("No world selected and no address "
                                        "provided. Nothing to do.");
-                       errorstream << wide_to_narrow(*error_message) << std::endl;
+                       errorstream << error_message << std::endl;
                        return false;
                }
 
                if (!fs::PathExists(worldspec.path)) {
-                       *error_message = wgettext("Provided world path doesn't exist: ")
-                                       + narrow_to_wide(worldspec.path);
-                       errorstream << wide_to_narrow(*error_message) << std::endl;
+                       error_message = gettext("Provided world path doesn't exist: ")
+                                       + worldspec.path;
+                       errorstream << error_message << std::endl;
                        return false;
                }
 
                // Load gamespec for required game
                gamespec = findWorldSubgame(worldspec.path);
                if (!gamespec.isValid() && !game_params.game_spec.isValid()) {
-                       *error_message = wgettext("Could not find or load game \"")
-                                       + narrow_to_wide(worldspec.gameid) + L"\"";
-                       errorstream << wide_to_narrow(*error_message) << std::endl;
+                       error_message = gettext("Could not find or load game \"")
+                                       + worldspec.gameid + "\"";
+                       errorstream << error_message << std::endl;
                        return false;
                }
 
@@ -444,10 +443,9 @@ bool ClientLauncher::launch_game(std::wstring *error_message,
                }
 
                if (!gamespec.isValid()) {
-                       *error_message = wgettext("Invalid gamespec.");
-                       *error_message += L" (world_gameid="
-                                       + narrow_to_wide(worldspec.gameid) + L")";
-                       errorstream << wide_to_narrow(*error_message) << std::endl;
+                       error_message = gettext("Invalid gamespec.");
+                       error_message += " (world.gameid=" + worldspec.gameid + ")";
+                       errorstream << error_message << std::endl;
                        return false;
                }
        }
index c3e0ae866ae01b292b788797e8e3d05c105ee2f8..09f8c039a1817be1245eac4173a108a485b6728f 100644 (file)
@@ -92,7 +92,7 @@ class ClientLauncher
        void init_args(GameParams &game_params, const Settings &cmd_args);
        bool init_engine(int log_level);
 
-       bool launch_game(std::wstring *error_message, GameParams &game_params,
+       bool launch_game(std::string &error_message, GameParams &game_params,
                        const Settings &cmd_args);
 
        void main_menu(MainMenuData *menudata);
index 8a9f3e1eae90baed094759562132eede9b9db2b3..8a0cda1269a2448c966dc576039e1a6a63eb5729 100644 (file)
@@ -1423,7 +1423,7 @@ class Game
                        // If address is "", local server is used and address is updated
                        std::string *address,
                        u16 port,
-                       std::wstring *error_message,
+                       std::string &error_message,
                        ChatBackend *chat_backend,
                        const SubgameSpec &gamespec,    // Used for local game
                        bool simple_singleplayer_mode);
@@ -1445,9 +1445,8 @@ class Game
 
        // Client creation
        bool createClient(const std::string &playername,
-                       const std::string &password, std::string *address, u16 port,
-                       std::wstring *error_message);
-       bool initGui(std::wstring *error_message);
+                       const std::string &password, std::string *address, u16 port);
+       bool initGui();
 
        // Client connection
        bool connectToServer(const std::string &playername,
@@ -1575,7 +1574,7 @@ class Game
        video::IVideoDriver *driver;
        scene::ISceneManager *smgr;
        bool *kill;
-       std::wstring *error_message;
+       std::string *error_message;
        IGameDef *gamedef;                     // Convenience (same as *client)
        scene::ISceneNode *skybox;
 
@@ -1692,7 +1691,7 @@ bool Game::startup(bool *kill,
                const std::string &password,
                std::string *address,     // can change if simple_singleplayer_mode
                u16 port,
-               std::wstring *error_message,
+               std::string &error_message,
                ChatBackend *chat_backend,
                const SubgameSpec &gamespec,
                bool simple_singleplayer_mode)
@@ -1700,7 +1699,7 @@ bool Game::startup(bool *kill,
        // "cache"
        this->device        = device;
        this->kill          = kill;
-       this->error_message = error_message;
+       this->error_message = &error_message;
        this->random_input  = random_input;
        this->input         = input;
        this->chat_backend  = chat_backend;
@@ -1714,7 +1713,7 @@ bool Game::startup(bool *kill,
        if (!init(map_dir, address, port, gamespec))
                return false;
 
-       if (!createClient(playername, password, address, port, error_message))
+       if (!createClient(playername, password, address, port))
                return false;
 
        return true;
@@ -1934,10 +1933,10 @@ bool Game::createSingleplayerServer(const std::string map_dir,
        }
 
        if (bind_addr.isIPv6() && !g_settings->getBool("enable_ipv6")) {
-               *error_message = L"Unable to listen on " +
-                               narrow_to_wide(bind_addr.serializeString()) +
-                               L" because IPv6 is disabled";
-               errorstream << wide_to_narrow(*error_message) << std::endl;
+               *error_message = "Unable to listen on " +
+                               bind_addr.serializeString() +
+                               " because IPv6 is disabled";
+               errorstream << *error_message << std::endl;
                return false;
        }
 
@@ -1950,8 +1949,7 @@ bool Game::createSingleplayerServer(const std::string map_dir,
 }
 
 bool Game::createClient(const std::string &playername,
-               const std::string &password, std::string *address, u16 port,
-               std::wstring *error_message)
+               const std::string &password, std::string *address, u16 port)
 {
        showOverlayMessage(wgettext("Creating client..."), 0, 10);
 
@@ -1966,19 +1964,19 @@ bool Game::createClient(const std::string &playername,
                return false;
 
        if (!could_connect) {
-               if (*error_message == L"" && !connect_aborted) {
+               if (error_message->empty() && !connect_aborted) {
                        // Should not happen if error messages are set properly
-                       *error_message = L"Connection failed for unknown reason";
-                       errorstream << wide_to_narrow(*error_message) << std::endl;
+                       *error_message = "Connection failed for unknown reason";
+                       errorstream << *error_message << std::endl;
                }
                return false;
        }
 
        if (!getServerContent(&connect_aborted)) {
-               if (*error_message == L"" && !connect_aborted) {
+               if (error_message->empty() && !connect_aborted) {
                        // Should not happen if error messages are set properly
-                       *error_message = L"Connection failed for unknown reason";
-                       errorstream << wide_to_narrow(*error_message) << std::endl;
+                       *error_message = "Connection failed for unknown reason";
+                       errorstream << *error_message << std::endl;
                }
                return false;
        }
@@ -1997,9 +1995,8 @@ bool Game::createClient(const std::string &playername,
        if (m_cache_enable_clouds) {
                clouds = new Clouds(smgr->getRootSceneNode(), smgr, -1, time(0));
                if (!clouds) {
-                       *error_message = L"Memory allocation error";
-                       *error_message += narrow_to_wide(" (clouds)");
-                       errorstream << wide_to_narrow(*error_message) << std::endl;
+                       *error_message = "Memory allocation error (clouds)";
+                       errorstream << *error_message << std::endl;
                        return false;
                }
        }
@@ -2012,9 +2009,8 @@ bool Game::createClient(const std::string &playername,
        local_inventory = new Inventory(itemdef_manager);
 
        if (!(sky && local_inventory)) {
-               *error_message = L"Memory allocation error";
-               *error_message += narrow_to_wide(" (sky or local inventory)");
-               errorstream << wide_to_narrow(*error_message) << std::endl;
+               *error_message = "Memory allocation error (sky or local inventory)";
+               errorstream << *error_message << std::endl;
                return false;
        }
 
@@ -2028,7 +2024,7 @@ bool Game::createClient(const std::string &playername,
                crack_animation_length = 5;
        }
 
-       if (!initGui(error_message))
+       if (!initGui())
                return false;
 
        /* Set window caption
@@ -2046,15 +2042,15 @@ bool Game::createClient(const std::string &playername,
        hud = new Hud(driver, smgr, guienv, gamedef, player, local_inventory);
 
        if (!hud) {
-               *error_message = L"Memory error: could not create HUD";
-               errorstream << wide_to_narrow(*error_message) << std::endl;
+               *error_message = "Memory error: could not create HUD";
+               errorstream << *error_message << std::endl;
                return false;
        }
 
        return true;
 }
 
-bool Game::initGui(std::wstring *error_message)
+bool Game::initGui()
 {
        // First line of debug text
        guitext = guienv->addStaticText(
@@ -2095,8 +2091,8 @@ bool Game::initGui(std::wstring *error_message)
        gui_chat_console = new GUIChatConsole(guienv, guienv->getRootGUIElement(),
                        -1, chat_backend, client);
        if (!gui_chat_console) {
-               *error_message = L"Could not allocate memory for chat console";
-               errorstream << wide_to_narrow(*error_message) << std::endl;
+               *error_message = "Could not allocate memory for chat console";
+               errorstream << *error_message << std::endl;
                return false;
        }
 
@@ -2146,16 +2142,16 @@ bool Game::connectToServer(const std::string &playername,
                        local_server_mode = true;
                }
        } catch (ResolveError &e) {
-               *error_message = L"Couldn't resolve address: " + narrow_to_wide(e.what());
-               errorstream << wide_to_narrow(*error_message) << std::endl;
+               *error_message = std::string("Couldn't resolve address: ") + e.what();
+               errorstream << *error_message << std::endl;
                return false;
        }
 
        if (connect_address.isIPv6() && !g_settings->getBool("enable_ipv6")) {
-               *error_message = L"Unable to connect to " +
-                               narrow_to_wide(connect_address.serializeString()) +
-                               L" because IPv6 is disabled";
-               errorstream << wide_to_narrow(*error_message) << std::endl;
+               *error_message = "Unable to connect to " +
+                               connect_address.serializeString() +
+                               " because IPv6 is disabled";
+               errorstream << *error_message << std::endl;
                return false;
        }
 
@@ -2205,9 +2201,9 @@ bool Game::connectToServer(const std::string &playername,
 
                        // Break conditions
                        if (client->accessDenied()) {
-                               *error_message = L"Access denied. Reason: "
+                               *error_message = "Access denied. Reason: "
                                                + client->accessDeniedReason();
-                               errorstream << wide_to_narrow(*error_message) << std::endl;
+                               errorstream << *error_message << std::endl;
                                break;
                        }
 
@@ -2253,16 +2249,12 @@ bool Game::getServerContent(bool *aborted)
                }
 
                // Error conditions
-               if (client->accessDenied()) {
-                       *error_message = L"Access denied. Reason: "
-                                       + client->accessDeniedReason();
-                       errorstream << wide_to_narrow(*error_message) << std::endl;
+               if (!checkConnection())
                        return false;
-               }
 
                if (client->getState() < LC_Init) {
-                       *error_message = L"Client disconnected";
-                       errorstream << wide_to_narrow(*error_message) << std::endl;
+                       *error_message = "Client disconnected";
+                       errorstream << *error_message << std::endl;
                        return false;
                }
 
@@ -2336,9 +2328,9 @@ inline void Game::updateInteractTimers(GameRunData *runData, f32 dtime)
 inline bool Game::checkConnection()
 {
        if (client->accessDenied()) {
-               *error_message = L"Access denied. Reason: "
+               *error_message = "Access denied. Reason: "
                                + client->accessDeniedReason();
-               errorstream << wide_to_narrow(*error_message) << std::endl;
+               errorstream << *error_message << std::endl;
                return false;
        }
 
@@ -4219,7 +4211,7 @@ void the_game(bool *kill,
                const std::string &address,         // If empty local server is created
                u16 port,
 
-               std::wstring &error_message,
+               std::string &error_message,
                ChatBackend &chat_backend,
                const SubgameSpec &gamespec,        // Used for local game
                bool simple_singleplayer_mode)
@@ -4235,24 +4227,24 @@ void the_game(bool *kill,
        try {
 
                if (game.startup(kill, random_input, input, device, map_dir,
-                                       playername, password, &server_address, port,
-                                       &error_message, &chat_backend, gamespec,
-                                       simple_singleplayer_mode)) {
-
+                               playername, password, &server_address, port,
+                               error_message, &chat_backend, gamespec,
+                               simple_singleplayer_mode)) {
                        game.run();
                        game.shutdown();
                }
 
        } catch (SerializationError &e) {
-               error_message = L"A serialization error occurred:\n"
-                               + narrow_to_wide(e.what()) + L"\n\nThe server is probably "
-                               L" running a different version of " PROJECT_NAME ".";
-               errorstream << wide_to_narrow(error_message) << std::endl;
+               error_message = std::string("A serialization error occurred:\n")
+                               + e.what() + "\n\nThe server is probably "
+                               " running a different version of " PROJECT_NAME ".";
+               errorstream << error_message << std::endl;
        } catch (ServerError &e) {
-               error_message = narrow_to_wide(e.what());
-               errorstream << "ServerError: " << e.what() << std::endl;
+               error_message = e.what();
+               errorstream << "ServerError: " << error_message << std::endl;
        } catch (ModError &e) {
-               errorstream << "ModError: " << e.what() << std::endl;
-               error_message = narrow_to_wide(e.what()) + wstrgettext("\nCheck debug.txt for details.");
+               error_message = e.what() + strgettext("\nCheck debug.txt for details.");
+               errorstream << "ModError: " << error_message << std::endl;
        }
 }
+
index 61f780bee91115667f10d9ef1b5f2742086c915f..358b26c377eee66413a681f52c547e9ff2108eb1 100644 (file)
@@ -145,7 +145,7 @@ void the_game(bool *kill,
                const std::string &password,
                const std::string &address, // If "", local server is used
                u16 port,
-               std::wstring &error_message,
+               std::string &error_message,
                ChatBackend &chat_backend,
                const SubgameSpec &gamespec, // Used for local game
                bool simple_singleplayer_mode);
index 5acf04f91076cbbbe6e9df103b1acd1e46f2a7d8..4afe2a2ce07999e721c238dbb0b7f08b0bc6bbb2 100644 (file)
@@ -140,7 +140,7 @@ void Client::handleCommand_AccessDenied(NetworkPacket* pkt)
        // to be processed even if the serialisation format has
        // not been agreed yet, the same as TOCLIENT_INIT.
        m_access_denied = true;
-       m_access_denied_reason = L"Unknown";
+       m_access_denied_reason = "Unknown";
 
        if (pkt->getCommand() == TOCLIENT_ACCESS_DENIED) {
                if (pkt->getSize() < 1)
@@ -149,7 +149,9 @@ void Client::handleCommand_AccessDenied(NetworkPacket* pkt)
                u8 denyCode = SERVER_ACCESSDENIED_UNEXPECTED_DATA;
                *pkt >> denyCode;
                if (denyCode == SERVER_ACCESSDENIED_CUSTOM_STRING) {
-                       *pkt >> m_access_denied_reason;
+                       std::wstring wide_reason;
+                       *pkt >> wide_reason;
+                       m_access_denied_reason = wide_to_narrow(wide_reason);
                }
                else if (denyCode < SERVER_ACCESSDENIED_MAX) {
                        m_access_denied_reason = accessDeniedStrings[denyCode];
@@ -159,7 +161,9 @@ void Client::handleCommand_AccessDenied(NetworkPacket* pkt)
        // for compat with old clients
        else {
                if (pkt->getSize() >= 2) {
-                       *pkt >> m_access_denied_reason;
+                       std::wstring wide_reason;
+                       *pkt >> wide_reason;
+                       m_access_denied_reason = wide_to_narrow(wide_reason);
                }
        }
 }
index 599b70006c7d22c082d65440da4094c3b4de41dc..3a52ddacd4f5dfebb4a031f3c2af31770aa346af 100644 (file)
@@ -861,36 +861,36 @@ enum ToServerCommand
 };
 
 enum AccessDeniedCode {
-       SERVER_ACCESSDENIED_WRONG_PASSWORD = 0,
-       SERVER_ACCESSDENIED_UNEXPECTED_DATA = 1,
-       SERVER_ACCESSDENIED_SINGLEPLAYER = 2,
-       SERVER_ACCESSDENIED_WRONG_VERSION = 3,
-       SERVER_ACCESSDENIED_WRONG_CHARS_IN_NAME = 4,
-       SERVER_ACCESSDENIED_WRONG_NAME = 5,
-       SERVER_ACCESSDENIED_TOO_MANY_USERS = 6,
-       SERVER_ACCESSDENIED_EMPTY_PASSWORD = 7,
-       SERVER_ACCESSDENIED_ALREADY_CONNECTED = 8,
-       SERVER_ACCESSDENIED_SERVER_FAIL = 9,
-       SERVER_ACCESSDENIED_CUSTOM_STRING = 10,
-       SERVER_ACCESSDENIED_MAX = 11,
+       SERVER_ACCESSDENIED_WRONG_PASSWORD,
+       SERVER_ACCESSDENIED_UNEXPECTED_DATA,
+       SERVER_ACCESSDENIED_SINGLEPLAYER,
+       SERVER_ACCESSDENIED_WRONG_VERSION,
+       SERVER_ACCESSDENIED_WRONG_CHARS_IN_NAME,
+       SERVER_ACCESSDENIED_WRONG_NAME,
+       SERVER_ACCESSDENIED_TOO_MANY_USERS,
+       SERVER_ACCESSDENIED_EMPTY_PASSWORD,
+       SERVER_ACCESSDENIED_ALREADY_CONNECTED,
+       SERVER_ACCESSDENIED_SERVER_FAIL,
+       SERVER_ACCESSDENIED_CUSTOM_STRING,
+       SERVER_ACCESSDENIED_MAX,
 };
 
 enum NetProtoCompressionMode {
        NETPROTO_COMPRESSION_ZLIB = 0,
 };
 
-const static std::wstring accessDeniedStrings[SERVER_ACCESSDENIED_MAX] = {
-       L"Invalid password",
-       L"Your client sent something server didn't expect. Try reconnecting or updating your client",
-       L"The server is running in simple singleplayer mode. You cannot connect.",
-       L"Your client's version is not supported.\nPlease contact server administrator.",
-       L"Name contains unallowed characters",
-       L"Name is not allowed",
-       L"Too many users.",
-       L"Empty passwords are disallowed. Set a password and try again.",
-       L"Another client is connected with this name. If your client closed unexpectedly, try again in a minute.",
-       L"Server authenticator failed. Maybe the servers has some problems."
-       L"",
+const static std::string accessDeniedStrings[SERVER_ACCESSDENIED_MAX] = {
+       "Invalid password",
+       "Your client sent something the server didn't expect.  Try reconnecting or updating your client",
+       "The server is running in simple singleplayer mode.  You cannot connect.",
+       "Your client's version is not supported.\nPlease contact server administrator.",
+       "Player name contains disallowed characters.",
+       "Player name not allowed.",
+       "Too many users.",
+       "Empty passwords are disallowed.  Set a password and try again.",
+       "Another client is connected with this name.  If your client closed unexpectedly, try again in a minute.",
+       "Server authention failed.  This is likely a server error."
+       "",
 };
 
 #endif