diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-04-09 10:41:28 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-04-09 10:41:28 +0000 |
commit | cfe8dc3f2e2d7d03491be03513a19221ccfad457 (patch) | |
tree | 4b8e9abaa07cd5201f17da0b375b52dab11de389 | |
parent | 16ef8c97d9da0f2346af1f6426944379730fa6f4 (diff) | |
download | mana-client-cfe8dc3f2e2d7d03491be03513a19221ccfad457.tar.gz mana-client-cfe8dc3f2e2d7d03491be03513a19221ccfad457.tar.bz2 mana-client-cfe8dc3f2e2d7d03491be03513a19221ccfad457.tar.xz mana-client-cfe8dc3f2e2d7d03491be03513a19221ccfad457.zip |
Added check for username length > 4 characters
-rw-r--r-- | The Mana World.dev | 2 | ||||
-rw-r--r-- | src/gui/login.cpp | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/The Mana World.dev b/The Mana World.dev index 9b5309c3..1e072836 100644 --- a/The Mana World.dev +++ b/The Mana World.dev @@ -27,7 +27,7 @@ CustomMakefile= IncludeVersionInfo=1 SupportXPThemes=0 CompilerSet=0 -CompilerSettings=0010001001001000001101 +CompilerSettings=0010001001001001001001 [VersionInfo] Major=0 diff --git a/src/gui/login.cpp b/src/gui/login.cpp index ab06be75..bedc1e5d 100644 --- a/src/gui/login.cpp +++ b/src/gui/login.cpp @@ -119,6 +119,8 @@ void LoginDialog::action(const std::string& eventId) // Check login if (user.length() == 0) { new OkDialog("Error", "Enter your username first"); + } else if (user.length() < 4) { + new OkDialog("Error", "The username needs to be at least 4 characters"); } else { server_login(user, passField->getText()); close_session(); @@ -193,8 +195,6 @@ void server_login(const std::string& user, const std::string& pass) { while ((in_size < 23) || (out_size > 0)) { flush(); } - logger.log("Network: Packet ID: %x", RFIFOW(0)); - logger.log("Network: Packet length: %d", get_packet_length(RFIFOW(0))); if (RFIFOW(0) == 0x0069) { while (in_size < RFIFOW(2)) { @@ -216,7 +216,6 @@ void server_login(const std::string& user, const std::string& pass) { logger.log("Network: Server: %s (%s:%d)", server_info[0].name, iptostring(server_info[0].address), server_info[0].port); - logger.log("Network: Users: %d", server_info[0].online_users); RFIFOSKIP(RFIFOW(2)); } else if (RFIFOW(0) == 0x006a) { |