Some updates
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <regex>
|
||||
#include <src/build.h>
|
||||
#include <Properties.h>
|
||||
#include <src/client/command_handler/helpers.h>
|
||||
#include "src/channel/ClientChannelView.h"
|
||||
#include "SpeakingClient.h"
|
||||
#include "src/InstanceHandler.h"
|
||||
@@ -536,6 +537,14 @@ command_result SpeakingClient::handleCommandClientInit(Command& cmd) {
|
||||
} else if(key == "client_away_message") {
|
||||
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"};
|
||||
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();
|
||||
if (count_characters(name) < 3) return command_result{error::parameter_invalid, "client_nickname"};
|
||||
if (count_characters(name) > 30) return command_result{error::parameter_invalid, "client_nickname"};
|
||||
}
|
||||
|
||||
const auto &info = property::find<property::ClientProperties>(key);
|
||||
|
||||
Reference in New Issue
Block a user