early-access version 3867

This commit is contained in:
pineappleEA
2023-09-14 00:01:46 +02:00
parent 1c6545b36c
commit 3eb0e2e828
12 changed files with 187 additions and 53 deletions

View File

@@ -264,8 +264,9 @@ int main(int argc, char** argv) {
nickname = match[1];
password = match[2];
address = match[3];
if (!match[4].str().empty())
port = static_cast<u16>(std::stoi(match[4]));
if (!match[4].str().empty()) {
port = static_cast<u16>(std::strtoul(match[4].str().c_str(), nullptr, 0));
}
std::regex nickname_re("^[a-zA-Z0-9._\\- ]+$");
if (!std::regex_match(nickname, nickname_re)) {
std::cout