Minor fix

This commit is contained in:
WolverinDEV 2020-09-25 00:49:20 +02:00
parent 35c852b2cd
commit 3b4d519178
2 changed files with 1 additions and 3 deletions

View File

@ -539,8 +539,7 @@ command_result SpeakingClient::handleCommandClientInit(Command& cmd) {
if(cmd["client_away_message"].string().length() > ts::config::server::limits::afk_message_length)
return command_result{error::parameter_invalid_size, "client_away_message"};
} else if(key == "client_nickname_phonetic") {
auto name = cmd["client_away_message"].string();
if (count_characters(name) < 3) return command_result{error::parameter_invalid, "client_nickname_phonetic"};
auto name = cmd["client_nickname_phonetic"].string();
if (count_characters(name) > 30) return command_result{error::parameter_invalid, "client_nickname_phonetic"};
} else if(key == "client_nickname") {
auto name = cmd["client_nickname"].string();

View File

@ -552,7 +552,6 @@ command_result ConnectedClient::handleCommandClientEdit(Command &cmd, const std:
}
string name = cmd["client_nickname_phonetic"].string();
if (count_characters(name) < 3) return command_result{error::parameter_invalid, "Invalid name length. A minimum of 3 characters is required!"};
if (count_characters(name) > 30) return command_result{error::parameter_invalid, "Invalid name length. A maximum of 30 characters is allowed!"};
} else if(info == property::CLIENT_PLAYER_VOLUME) {
if(client->getType() != ClientType::CLIENT_MUSIC) return command_result{error::client_invalid_type};